Hi,
I am using Pyside. I don´t use any globals. I open the ui with .show(). And 
I close with cmds.deleteUI() if the windows exists.
Not all the widgets are parented to the UI, because that UI have widgets 
like buttons that launch other smallet UIs.

R

El martes, 25 de abril de 2017, 14:53:59 (UTC+1), thirstydevil escribió:
>
> You shouldn't need to gc.collect() in python.  When the instances 
> reference count goes to 0 then at some point in the future pythons garbage 
> collection will kick in.  If you are holding onto references then this 
> could account for the memory bloat.  But if you are patient you might also 
> see python clean up after itself.
>
> How are you building the UI?  PySide?  Are you using a lot of globals?  
> How are you closing and opening the UI?  Are you parenting all you widgets 
> into the UI?
>
> -Dave
>
>
> On Tue, Apr 25, 2017 at 2:19 PM, Rudi Hammad <[email protected] 
> <javascript:>> wrote:
>
>> Hello,
>> I am developing a rig builder tool for the studio that is quite heavy, 
>> and after running the UI I checked the garbage collection and I get a 
>> result of gc.collect() -->322. If I run the UI 3 times, then the 
>> gc.collect() -->955
>>
>> I don´t know much about memory performance so I wonder if  this happening 
>> because my code is not clean enough or if this normal while programming a 
>> code with a lot a variables and objects?
>> Should I just do gc.collect() at the end of the script to clean things up?
>>
>> thank you
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/python_inside_maya/9bc3d18a-5f39-44bf-948c-22c7d7746a86%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/python_inside_maya/9bc3d18a-5f39-44bf-948c-22c7d7746a86%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> *David Moulder*
> Technical Animator / Artist
> [email protected] <javascript:>
> *Professional Profile <http://uk.linkedin.com/pub/david-moulder/1/b12/b5a>*
>
> Mobile: +44 (0)7814033242
> See who we know in common 
> <http://www.linkedin.com/e/wwk/5748982/?hs=false&tok=3tztwkse1silw1> Want 
> a signature like this? 
> <http://www.linkedin.com/e/sig/5748982/?hs=false&tok=3pwLU9-mBsilw1>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/818f6def-71a8-4b51-b40e-9860dd6db5e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to