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: Wed, 30 Mar 2011 22:57:10 -0400

On Mar 30, 2011, at 10:37 PM, Daniel J Sebald wrote:

> On 03/30/2011 09:16 PM, Ben Abbott wrote:
>> 
>> On Mar 30, 2011, at 9:53 PM, Daniel J Sebald wrote:
>> 
>>> On 03/30/2011 08:45 PM, welkin zzp wrote:
>>>> Hi,
>>>>      When I close a figure window, I observed that the gnuplot and
>>>> gnuplot_x11 processes were always in the system,but didn't work, until
>>>> quit octave . I didn't known if it's a memory leak ,but I have to
>>>> frequently quit octave after having close few figure windows. The
>>>> version of octave is 3.4.0 on ubuntu systerm.
>>> 
>>> Welkin,
>>> 
>>> This topic might be more appropriate for the maintainers list, so I'm 
>>> cc'ing there.
>>> 
>>> From what I recall, Octave currently launches a separate instance of 
>>> gnuplot for each figure.  (Because gnuplot only saves the data/state for 
>>> the most current plot.)  But I'm not sure if what you describe is the 
>>> intended behavior or not, i.e., that gnuplot hangs around in case Octave 
>>> needs to use it again.  If not, perhaps you could give a more detailed 
>>> description with examples.  Maybe the behavior can be improved.
>>> 
>>> Dan
>> 
>> Welkin,
>> 
>> When you "close" a figure, do you type ...
>> 
>>      close (hfig)
>> 
>> .... or do you close the figure window using the mouse?
>> 
>> If the first, then the gnuplot session associated with the figure should 
>> terminate. However, for the latter, the gnuplot session remains open. Since 
>> there is no synchronous communication from gnuplot to octave, there is no 
>> method for Octave to become aware that the figure has been closed.
>> 
>> If this functionality is important for you, please try using the fltk 
>> backend. This can be turned on by ...
>> 
>>      graphics_toolkit fltk
>> 
>> Ben
> 
> Ben,
> 
> 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.

imo, any effort for such features should be directed toward the opengl 
backends. This particular feature already exists there.

Bne



reply via email to

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