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: Daniel J Sebald
Subject: Re: [OctDev] is memory leak of figure
Date: Thu, 31 Mar 2011 11:47:59 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9

On 03/31/2011 07:38 AM, Ben Abbott wrote:

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.

Last night I looked at a few things. I killed the gnuplot process and Octave goes into a bad state. That in itself isn't very graceful, but not a critical issue for Octave in its current form.

I could try to make mods to gnuplot so that it can reflect that wxt, x11, aqua, etc. have a closed window action. But how best to do so is the question.

My first thought was if an Octave function like ftell() would reflect the state of the gnuplot pipe, then having gnuplot exit upon a window close would do it. But seeing as its not so simple and C-level changes would be need for that, then a better solution might be good.


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.

With so many terminals, it seems the best way is to make the open/close communication consistent and generic. Probably through IPC.


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

I imagine that there isn't really too much code to change or write to create such a feature. But I'm open for advice on the best way to do it. My guess is to simply follow the protocols that are intended by the operating system in the first place. Some type of half-duplex communication with a semaphore perhaps? Then what would get communicated back and forth?

An additional question is how Octave would handle things in a half-duplex strategy.

Dan


reply via email to

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