Is there an object on given memory address?
via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Feb 12 02:16:47 PST 2015
On Thursday, 12 February 2015 at 10:04:29 UTC, tcak wrote:
> BTW, I have already got the address of object into a "size_t"
> type variable and sent it. That is not the problem part.
How reliable do you want? You would have to either "pin the
object" by registering a root to it to prevent it from being
moved or freed.
http://dlang.org/phobos/core_memory.html#.GC.addRoot
Or send a hash of the object along with the memory address, then
query the GC wether the memory is still allocated.
More information about the Digitalmars-d-learn
mailing list