On 2009-09-24 21:34+0100 Andrew Ross wrote: > plexit calls plend _after_ the exit handler is called, and so if the exit > handler > throws an exception plplot will not call plend to tidy up and free memory. > Provided > that you do this yourself in your handler then you _should_ be ok. > > Of course, we would need to check all code paths with plexit in to make sure > they > don't leave any locally allocated memory unfreed. I don't know whether this > is the > case. It has probably never been thoroughly tested since we only tend to run > valgrind on the examples which are set up not to generate any errors.
Sorry for entering late to this conversation. I may have missed some key piece of information earlier in the thread, but let me ask a "dumb" question, anyway. plexit ultimately calls exit, which AFAIK immediately exits without returning control to the routine that called the plplot library in the first place. So plexit should be reserved (and I think it normally is) for truly catastrophic errors where no means exist to recover. For that case where a castrophe is occurring anyway, why are we concerned about memory management issues? Why does plexit even bother to call plend? Shouldn't it just send a message about the castrophic error and exit? Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel