From: Alan W. I. <ir...@be...> - 2002-12-11 17:21:23
|
On Wed, 11 Dec 2002, Joao Cardoso wrote: > In that case, a pllib_end() makes sense! Symmetry is something I like (I'm a > physicist...). > >From your description, pllib_end should release the memory allocated by > pllib_init. And plend should call pllib_end, as plinit calls pllib_init. > > Sure. knowing that a pllib_end() exists will encourage us to not loose the > track of allocated memory. > > > So has a consensus been reached here to use plend for this library memory > > release task with appropriate plend =>plend1 adjustments to the x octave > > scripts? > > OK. But don't you want to accept my idea of a pllib_end()? That sounds fine to me. For now, I have reactivated what I did to release libltdl memory in plend, and changed your octave x examples (plend ==> plend1) so they still work. I encourage you to follow up on that with implementing the pllib_end idea. I prefer you to do that aspect since I always seem to have trouble creating new C functions correctly. Also, you will probably want to set a flag in pllib_end so that any attempt to call plinit afterward fails gracefully rather than just crashing because the memory resources are gone. Obviously, this is just the start of pllib_end. I encourage those who are familiar with the dynamic driver's memory allocation to release it properly in pllib_end to respond to the bug report that Joao mentioned in a later e-mail as well as to get a clean bill of health from valgrind. Alan email: ir...@be... phone: 250-727-2902 FAX: 250-721-7715 snail-mail: Dr. Alan W. Irwin Department of Physics and Astronomy, University of Victoria, P.O. Box 3055, Victoria, British Columbia, Canada, V8W 3P6 __________________________ Linux-powered astrophysics __________________________ |