Closing the window won't destroy the actual object by default. There are window flags that can make that happen. But all you need to do is call myWindow.deleteLater() to destroy the Qt object. It will delete all of the child objects in turn. So make sure you properly set the parent attribute of child widgets. It would be a mistake to make anything except top level windows a child of the Maya window. Most of your objects should be descendants of your own window.
QPixmapCache is a Singleton with access via static methods. So you just call stuff like insert and find to set and get pixmaps from the cache. You can change the limit of the storage probably near the top of your module. Though being that Maya is a long running python session, be aware that more than one script all share the same cache. On May 14, 2013 5:53 AM, "drOne piece" <[email protected]> wrote: > Hi Jay! > Sounds to me that the memory explosion could have something to do with the > scaling of the images... I will try to get rid of that function now and > just use prescaled thumbnails and see if that helps or if I still have a > big memory hit. > > > thanks! > > Den måndagen den 13:e maj 2013 kl. 07:38:25 UTC+2 skrev Jay Goodman: > > I ran into the same memory explosion before when I got lazy and just > scaled images down in memory rather than saving off actual thumbnails to > disk. > > > > I setup an http server to host images on and used a QThreadPool as a > downloader. It worked quite well, but I had call on two 3rd party > libraries: httplib2 and poster. > > -- > 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 post to this group, send email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- 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 post to this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
