Thank Ivan for your reply. I had already tried to disable undo yesterday but with no luck. The memory still doesn't empty. The big problem I am encountering is that if I run my script more than 2 or 3 times, I start to get a 'too many open files' error and I guessed that freeing the memory could help
On Tue, Sep 25, 2012 at 11:49 PM, Ivan Busquets <ivanbusqu...@gmail.com>wrote: > Luca, > > Even if you delete your nodes, their Ops are likely to be kept around in > memory so they can be restored by an Undo operation. > > Not sure if this will help your case, but you could disable the creation > of a new Undo set, then create your nodes, delete them, and re-enable Undos. > > ex: > > nuke.Undo().disable() > > for n in range(10000): > > a = nuke.nodes.Grade() > > a['selected'].setValue(True) > > nukescripts.node_delete(popupOnError=True) > > nuke.Undo().enable() > > > On Tue, Sep 25, 2012 at 1:40 PM, Luca Fiorentini < > luca.fiorent...@gmail.com> wrote: > >> Hi Howard, >> Thanks but this gives me the same result. >> If I run this >> >> [CODE] for n in range(10000): >> >> a = nuke.nodes.Grade() >> >> a['selected'].setValue(True) >> >> nukescripts.node_delete(popupOnError=True) >> [/CODE] >> >> i get 500 megs added for each execution! Weird!! >> >> >>> >>> Howard >>> >>> ------------------------------ >>> *From:* Luca Fiorentini <luca.fiorent...@gmail.com> >>> *To:* Nuke Python discussion <nuke-python@support.thefoundry.co.uk> >>> *Sent:* Tuesday, 25 September 2012, 19:05 >>> *Subject:* [Nuke-python] nuke delete seems not to flush memory >>> >>> Hi, >>> >>> I am trying to delete some nodes from the workspace with this code >>> >>> [CODE]for n in nuke.allNodes(): >>> nuke.delete(n)[/CODE] >>> >>> where n is my object. >>> This is part of a function that I use to delete and then recreate some >>> nodes and every time I call it the ram usage goes up. >>> So it seems to me that nuke is unable to flush the memory where the >>> nodes where stored. >>> Is this a known bug or I am missing something? >>> >>> Thanks for your time. >>> >>> -- >>> *Luca Fiorentini - 3D Lighting Artist* >>> My Showreel <http://www.vimeo.com/lucafiorentini/reel> - My >>> blog<http://lucafiorentini.wordpress.com/>- My >>> Flickr <http://www.flickr.com/photos/lucafiorentini> >>> >>> >>> _______________________________________________ >>> Nuke-python mailing list >>> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ >>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python >>> >>> >>> >>> _______________________________________________ >>> Nuke-python mailing list >>> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ >>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python >>> >>> >> >> >> -- >> *Luca Fiorentini - 3D Lighting Artist* >> My Showreel <http://www.vimeo.com/lucafiorentini/reel> - My >> blog<http://lucafiorentini.wordpress.com>- My >> Flickr <http://www.flickr.com/photos/lucafiorentini> >> >> >> _______________________________________________ >> Nuke-python mailing list >> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ >> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python >> >> > > _______________________________________________ > Nuke-python mailing list > Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > > -- *Luca Fiorentini - 3D Lighting Artist* My Showreel <http://www.vimeo.com/lucafiorentini/reel> - My blog<http://lucafiorentini.wordpress.com>- My Flickr <http://www.flickr.com/photos/lucafiorentini>
_______________________________________________ Nuke-python mailing list Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python