Added some comments concerning stack allocation and references

This commit is contained in:
Pavel Kirienko
2015-05-29 22:23:41 +03:00
parent af09237dd2
commit d8c096430f
3 changed files with 14 additions and 1 deletions
@@ -140,7 +140,10 @@ public:
typedef TransferListenerTemplate<BufferSize, NumStaticBufs, NumStaticReceivers> Type;
};
/**
* Please note that the reference passed to the RX callback points to a stack-allocated object, which means
* that it gets invalidated shortly after the callback returns.
*/
template <typename DataSpec, typename DataStruct, typename TransferListenerType>
class UAVCAN_EXPORT GenericSubscriber : public GenericSubscriberBase
{