I want to purge objects after erasing them to free up allocated memory.
productMgd.Erase(); var erased = new ObjectIdCollection(); erased.Add(productMgd.Id); database.ReclaimMemoryFromErasedObjects(erased);
This is happening within a single transaction. When the call to ReclaimMemoryFromErasedObjects(...) is reached, I get the error eInvalidOpenState. Any examples of using this method? Can anyone shed some light on why this error is being returned. The object is stored in a dictionary, not modelspace.
Mike
Solved! Go to Solution.
Solved by FRFR1426. Go to Solution.
The doc says:
> All object ids in the collection must correspond to erased objects, which must be entirely closed.
So I think you should commit your transaction before calling this method.
Here is a blog post which shows an example of reclaiming memory of erased objects:
http://adndevblog.typepad.com/autocad/2012/04/reclaiming-memory-of-erased-objects.html
Can't find what you're looking for? Ask the community or share your knowledge.