> > @Phil: I assume with a lot of trouble (such as implementing more > centralized control of our memory allocations) you could deal with > resource leaks using the setjmp/longjmp approach, but for the above > reason I don't think you should bother.
actually not that much trouble. We just have plmalloc keep a list of all memory allocations in a variable in the PLStream and plfree can remove items from that list. Then we have a free all function which gets called before the API returns, which frees anything left on the list. This not only deals with memory leaks after a longjmp, but if we miss a free anywhere it will also clean up any other memory leaks. I have already implemented it in the plmalloc/plfree functions I've written. I'm just adding the calls and I will forward it round. Phil ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel