Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
I suspect the problem you're running into is due to the fact that all objects you get from Poser are implemented in native code and that the memory is leaking because the underlying allocated memory can't be released by the Python garbage collector.
The only thing you can do is to try using del on large lists, tuples, and arrays allocated via numeric or numpy, to see if you can improve the situation.
It may also be the case that the use of native objects prevent the debugging tools from detecting where leaks are occuring.
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
Hi, I noticed memory goes down when I execute my script, and it doesnt return. The more often its executed, the more the memory goes down.
What I did was this:
def _dbg_dump_gc( ):
#l = []
#l.append(l)
gc.set_debug(gc.DEBUG_SAVEALL)
print gc.collect( )
print gc.collect( )
print 'leaks:'
for i in gc.garbage:
pprint.pprint (i)
print 'end of leaks.'
del gc.garbage[:]
but that isnt printing anything except the gc.collect return values, which are 0, unless I decomment that part with an intentional hanging self-referring list.
but that isnt evening printing the global variables. I wonder why. maybe some more flags have to be set?
thanks a lot!
col