What is Correct Way to Exit J9/SWT on PPC [message #467103] |
Tue, 24 January 2006 22:28  |
Eclipse User |
|
|
|
Hi,
Just starting out with J9/SWT on a PocketPC and couldn't find the
answer to this.
I'm playing around with some screen layouts, so I'm starting and
stopping my application a lot. I'm using the Shell constructor
without any options, so I get the "Smart Minimize". I know I can stop
the application from Setting/Memory, but I also wanted the option to
exit from within the application. I added a Menu bar with an Exit
option, and the listener for this issues a System.exit(0).
But doing this doesn't appear to release the memory used by the
application. Should it.
I decided to ask this here, because I'm also running a J9 "console"
application, and that doesn't seem to have any problems freeing the
memory, which makes me think my question is SWT related.
Cheers,
Eddie
|
|
|
Re: What is Correct Way to Exit J9/SWT on PPC [message #467117 is a reply to message #467103] |
Wed, 25 January 2006 07:36   |
Eclipse User |
|
|
|
Eddie Atherton escreveu:
> Hi,
>
> Just starting out with J9/SWT on a PocketPC and couldn't find the
> answer to this.
>
> I'm playing around with some screen layouts, so I'm starting and
> stopping my application a lot. I'm using the Shell constructor
> without any options, so I get the "Smart Minimize". I know I can stop
> the application from Setting/Memory, but I also wanted the option to
> exit from within the application. I added a Menu bar with an Exit
> option, and the listener for this issues a System.exit(0).
>
> But doing this doesn't appear to release the memory used by the
> application. Should it.
>
> I decided to ask this here, because I'm also running a J9 "console"
> application, and that doesn't seem to have any problems freeing the
> memory, which makes me think my question is SWT related.
>
> Cheers,
> Eddie
Hi Eddie,
Did you try to call your application with j9w ? If I'm not wrong, that's
the solution for this problem.
Alexandre
|
|
|
|
Re: What is Correct Way to Exit J9/SWT on PPC [message #467761 is a reply to message #467136] |
Mon, 06 February 2006 05:29  |
Eclipse User |
|
|
|
Eddie Atherton wrote:
> Sorry, no difference. The memory used still jumps by around 3MB each
> time I run the test.
I use PocketPC also. When I wanted a clean exit in the early stages of
development I used SWT.CLOSE to give me an OK button rather that a smart
minimise. This should unload the app.
If that's no use then maybe you are shorting the logic that deals with
disposing the widgets in using System.exit(0) directly? I don't know,
I've never done that myself.
It's not something I've ever been too concerned about - the smart
minimise feature is the way PocketPC works. Users don't exit
applications, they just stay loaded. Some PDAs give you a task switcher
that unloads things.
HTH
andy
|
|
|
Powered by
FUDForum. Page generated in 0.08408 seconds