Memoty owner

Mar 4, 2015 at 9:22 PM
first of all, thanks for your excellent job.
I am doing some complex analysis on the data, and I am using multi-threading, and this is making me question who is the owner of the packet memory and if I need to copy it if I'm doing async.
Let me summarize, the main thread listens on the interface, when a packet arrive is just copied to a queue while other threads consume that queue. So from the library the packet is already consumed (the delegate I give to the packet comm is already finish) but I will use that packet later.
Is this OK? or do I need to copy the packet before? do you reuse the memory or it's a regular object that needs GC?

Thanks again!

Mar 13, 2015 at 8:42 AM
Hi JL,

A Packet instance is the owner of the data.
It is being GC like any regular .NET object.
No need to worry about the data disappearing.