I don't follow... If you need to free the data, you have to ensure that matplotlib doesn't need it, and the only way to do that is destroy the figure that references it. It's virtually impossible to create a dangling reference in Python (from within Python).
Mike guillaume ranquet wrote: > Thanks Mike, > I just wanted to be sure wether matplotlib had a copy or not. > I'll have to work on giving hints to the GC then... > > guillaume. > > Michael Droettboom wrote: > >> Yes, Python is reference counted (with a garbage collector to handle >> cycles etc.). So, yes, the matplotlib plot keeps a "reference" to your >> data after you pass it in so it continue to redraw it as the plot is >> panned/zoomed/resized etc. You can safely del your local reference, but >> the memory itself will not be freed, since matplotlib still needs it. >> >> Mike >> >> guillaume ranquet wrote: >> >>> I'm currently trying to improve my app to render more and more data. >>> I'm wondering if matplotlib keeps an internal copy of the datas once the >>> plot function has been called? >>> >>> from what I understand from python (I'm quite new to python), everything >>> is reference and no implicit copies are done. I'm trying to check on >>> matplotlib if it's the case but I must admit I got some difficulties xD >>> >>> >>> to sum it up: can I del the arrays I just passed to an axis.plot ? >>> >>> >>> thanks for your help :) >>> ---- >>> This message contains confidential information and may contain >>> information that is legally privileged. If you have received this >>> message by mistake, please immediately notify us and delete the >>> original message. Thank you. >>> Ce message contient des informations confidentielles. S'il vous est >>> parvenu par erreur, merci de bien vouloir nous en aviser par retour, >>> de n'en faire aucun usage et de n'en garder aucune copie. >>> ---- >>> >>> ------------------------------------------------------------------------------ >>> >>> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT >>> is a gathering of tech-side developers & brand creativity >>> professionals. Meet >>> the minds behind Google Creative Lab, Visual Complexity, Processing, & >>> iPhoneDevCamp as they present alongside digital heavyweights like >>> Barbarian Group, R/GA, & Big Spaceship. >>> http://p.sf.net/sfu/creativitycat-com >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Matplotlib-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >>> > > ---- > This message contains confidential information and may contain information > that is legally privileged. If you have received this message by mistake, > please immediately notify us and delete the original message. Thank you. > > Ce message contient des informations confidentielles. S'il vous est parvenu > par erreur, merci de bien vouloir nous en aviser par retour, de n'en faire > aucun usage et de n'en garder aucune copie. > ---- > > ------------------------------------------------------------------------------ > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT > is a gathering of tech-side developers & brand creativity professionals. Meet > the minds behind Google Creative Lab, Visual Complexity, Processing, & > iPhoneDevCamp as they present alongside digital heavyweights like Barbarian > Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users