Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

S plus closing / memory leak

14 views
Skip to first unread message

chris_...@yahoo.com

unread,
Dec 8, 2006, 6:37:41 AM12/8/06
to
hi there,

Bit of a long shot, but there are some gurus out there:)

I'm having S plus issues... I've got a model, written in VBA which runs
s plus commands, and takes several hours to run. I have set it up so
that I can run many many of these simulations back to back via a simple
script.

However, I think our model may have a memory leak, as eventually it
runs out of memory, and crashes.

A simple solution I have to this (without looking for the memory leak,
which I *will* do eventually) is to simpley open and close S plus from
my script every once in a while - forcing it do return memory to the
Operating System. This works nicely, and I close S plus simply by
passing it the "exit()" function.

However. I have noticed that S plus will close gracefully using exit()
_only_ if the commands window is open - otherwise it bombs and causes
my script to die. When we open S plus from excel (via vba), the
commands window is not open. I have to usre exit() rather than q() as
q() often presents clickboxes asking if you want to save anything,
which obviously my testscript cannot handle.

Does anyone have any suggestions? I have three possibles:

1. How can you suppress messageboxes in S plus?, then I might be able
to close it with q()

2. What command can be used to open the command window (I thought a
guiOpen sort of command must exist, but can't find it). Then I can
force it to use exit() properly.
Which came first? the chicken (command window) or the egg (command to
open the command window)?

3. Is there a command to remove all objects from S plus in one? then I
wouldn't have to worry about closing it, or my memory leak :)

It's incredibly frustrating, but I'm hoping very simple to solve!

thank in advance

Chris

0 new messages