From: Per P. <per...@ma...> - 2004-03-27 21:50:25
|
On Mar 26, 2004, at 12:59, Hans-Bernhard Broeker wrote: > >> 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. > > ObjC code in the middle of the native C stuff might be bad news. At > minimum, I'ld like to see this isolate to a separate source file, which > a plain C compiler won't even look at. > >> 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. > > "Through" this function: almost certainly. But I would think this > could > more sensibly be put into your term->graphics() and term->text(). Those > are called once per plot generated, which really should be sufficient > for > your needs. It'd also have the benefit of placing these Chunks in a > place > that already is out of sight of non-Objective-C compilations. Well, it turned out in testing that there was at least one place where a driver call came from outside command() in command.c: #7 0x000650a0 in term_suspend () at term.c:560 #8 0x00009854 in com_line () at command.c:266 #9 0x0003f408 in main (argc=1, argv=0xbffffc1c) at plot.c:626 So, I'll leave command.c alone (for now at least) and handle these things in the driver. /Per |