octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OctDev] is memory leak of figure


From: Ben Abbott
Subject: Re: [OctDev] is memory leak of figure
Date: Thu, 31 Mar 2011 08:38:36 -0400

On Mar 30, 2011, at 11:32 PM, Daniel J Sebald wrote:

> On 03/30/2011 09:57 PM, Ben Abbott wrote:
> 
>>> Should I propose a new feature for gnuplot that will cause an exit if an 
>>> interactive window is closed?
>> 
>> I don't think that is a good idea.
>> 
>> (1) There is no synchronous communication between gnuplot and octave, and(2) 
>> Gnuplot can't tell us when its windows are closed.
>> 
>> It may be possible to request the x11 window id from gnuplot, but that will 
>> not help with other terminal types (aqua, windows ,etc). Nor does it resolve 
>> the problem with missing synchronous communication.
> 
> Well, what I was thinking is that whenever one of the interactive windows is 
> closed, it would trigger gnuplot to exit and gnuplot's process would no 
> longer be in the operating system.
> 
> Octave would just need to check if its registered process ID still exists.  
> If not, create a new gnuplot process.  It's still a bit dodgy though because 
> someone could close the window while Octave is sending data through the pipe. 
>  So, there would need to be some way of toggling said feature on and off.  
> I.e., turn the feature off until Octave is done sending data, then enable the 
> feature.
> 
> Dan

Dan, my understanding is that there is no mechanism by which Octave can 
determine if the gnuplot window has closed. Also there is no (existing) 
mechanism to tell gnuplot to exit when its plot window is closed. To further 
complicate things, gnuplot supports several guis (wxt, x11, aqua, windows, pm, 
etc). On some (MacOS using Aquaterm for example, and Windows I think) there is 
no mechanism for gnuplot to know if the plot window opened, or if it has been 
closed.

Do you have an idea for how these problems may be solved?

Ben





reply via email to

[Prev in Thread] Current Thread [Next in Thread]