[Ironpython-users] Delete a large object in ironpython, and releasing the memory?

Djordje Spasic issworld2000 at yahoo.com
Sun Dec 20 07:00:22 EST 2015


I am a creating a huge mesh object (some 900 megabytes in size) in Rhino3d application by using its ironpython 2.7 interpreter.Once I am done with analysing this mesh, I would like to somehow delete it from the memory.

I did a bit of search on stackoverflow.com, and I found out that "del" statement will only delete the reference to mentioned mesh. Not the mesh object itself.
And that after some time, the mesh object will eventually get garbage collected. At least this is what some users on stackoverflow say about the regular cpython.

Is "gc.collect()" the only way by which I could instantly release the memory, and there for somehow remove the mentioned large mesh from the memory?
I've also found replies on stackoverflow.com which state that "gc.collect()" should be avoided (at least when it comes to regular python, not specifically ironpython).
I've also find comments on stackoverflow which claim that in IronPython it is not even guaranteed the memory will be released if nothing else is holding a reference.

Any comments on all these issues?

Is it even possible to instantly free the memory from the deleted large object in ironpython (2.7)?

Thank you for the reply.

Kind regards,
Djordje Spasic

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20151220/85f9c357/attachment.html>


More information about the Ironpython-users mailing list