[Kst] Re: LocalData needs more work

Marc-Antoine Miville-Deschenes mamd at ias.u-psud.fr
Thu Oct 21 21:48:11 CEST 2004


I don't have problem with that solution.
Just send me an example when it is implemented and I will
modify my plugins.

Marc-Antoine Miville-Deschenes
Institut d'Astrophysique Spatiale	e-mail: mamd at ias.u-psud.fr
bat. 121, Universite Paris XI		tel: (33-1) 69 85 85 77
91405 Orsay Cedex, France		fax: (33-1) 69 85 86 75

mamd

> 
>    I discovered that localdata leaks memory on plugin destruction today, but 
> the proper fix is not easy.  I put in a free() for now, but if the plugin 
> allocates a complex structure or array, we will still leak most of the 
> memory.  The only solution I can see is to have a destructor in the plugin 
> itself, such as a symbol:
> void freeLocalData(void **data);
> 
>    If we see that symbol, we call it, but it is not mandatory and the fallback 
> is to just use free(), perhaps with a KstDebug notice sent out.  Does this 
> sound usable? (Marc-Antoine, I think you're the only person using localdata, 
> so I'm particularly asking you.)
> 
> -- 
> George Staikos
> KDE Developer				http://www.kde.org/
> Staikos Computing Services Inc.		http://www.staikos.net/
> 




More information about the Kst mailing list