Re: Testing atoms if pointer
- Posted by mattlewis (admin) Aug 16, 2010
- 1252 views
RStowasser said...
So probably there is no simple solution to find out if I had allocated memory to an atom?
There is safe.e, which is meant to track this sort of thing. It's usually more for debugging, but essentially, you just need to keep track of this stuff by storing your allocations and forgetting them when they're freed. This is basically the approach taken by safe.e.
This is probably the point at which it's a good idea to ask what you're trying to accomplish, rather than how you're trying to accomplish it. So, why do you want to know if you're dealing with an allocated pointer?
Matt