From: Per P. <per...@ma...> - 2004-03-26 10:11:51
|
On 2004-03-25, at 14.09, Hans-Bernhard Broeker wrote: > We may have to prepare another (hopefully the last!) release candidate > tarball because of the possible consequences of this change. Sorry > about > that, but this seemed the only reasonable way we would ever get out of > that mess with MacOS X. Hi, maybe this is reason enough to switch to the new aquaterm.trm driver for OS X. It is currently in alpha testing and I discussed the subject with Lars Hecking and it was decided to wait until after the 4.0 release. However, the new driver has matured rapidly and is much cleaner than the old driver and supports more gnuplot features. The new driver depends on a shared lib (libaquaterm), which would have to be checked for by configure. It also needs a patch for apple.m4 (previously posted here). I'd also like to patch command.c to fix a problem with the semi-automatic garbage collection in Objective-C that could lead to excessive memory use during long running sessions. Patch below (it will have to be conditioned on libaquaterm (or Mac OS X) presence). What it does is to set up and tear down an "object pool" for every loop through the event cycle. Placing it here is based on the assumption that all calls to the driver is guaranteed to be made through this single function. If it is not, then I'll have to invent some other solution, but that could take some time since I'm very busy at the moment. So, what do you all think? /Per --- src/command.c.old Thu Feb 19 23:43:14 2004 +++ src/command.c Fri Mar 26 10:55:02 2004 @@ -63,6 +63,8 @@ * */ +#import <Foundation/NSAutoreleasePool.h> + #include "command.h" #include "alloc.h" @@ -500,6 +502,7 @@ static void command() { + NSAutoreleasePool *arpool = [[NSAutoreleasePool alloc] init]; int i; for (i = 0; i < MAX_NUM_VAR; i++) @@ -509,7 +512,7 @@ define(); else (*lookup_ftable(&command_ftbl[0],c_token))(); - + [arpool release]; return; } |