free memory

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

free memory

Hao Jiang-3
I'm new to imageJ, now working on some plug-in other people wrote
several years ago.
 
The problem is, there is a filter plug-in, after it's done, or "undo"
it, even close the image will not release memory.
 
My details, we use our own plug-in to open an image, if did nothing
before close it, I can release memory by click on status bar, as someone
told before. But after applied this filter, click on status bar won't
work.
 
I read some sample filter code on ImageJ site, couldn't find something
specific to memory release, how can I do it?
 
Thanks
 
 
Hao
Tel. +1 403.266.0900 x352 |  Fax. +1 403.265.0499  
Calgary, Alberta, Canada

 


*************************************************************************
PRIVILEGE AND CONFIDENTIALITY NOTICE:

The information in this email is intended for the named recipients only.
It may contain privileged and confidential information.  If you have
received this communication in error, any use, copying or dissemination
of its contents is strictly prohibited.  Please erase all copies of the
message along with any included attachments and notify Intermap
Technologies or the sender immediately by telephone at the number
indicated on this page.

*************************************************************************
Reply | Threaded
Open this post in threaded view
|

Antwort: free memory

Joachim Wesner
Hi Hao,

what exactly is your problem? That the plugin does not seem to free memory
when
it should (maybe checking with "Monitor Memory") or do you really run out
of memory
some time?

You must know, Java Garbage Collection does not necessarily free memory,
even when
called explicitely (in newer versions of Java), it might delay releasing
"unused" memory when
it´s really  needed for new objects, so "Monitor Memory" does not
necessarily give the info
you expect.

See this very good article by Albert Cardona

http://imagejdocu.tudor.lu/imagej-documentation-wiki/how-to/imagej-performance-tuning

Joachim

ImageJ Interest Group <[hidden email]> schrieb am 01.05.2008 19:33:07:

> I'm new to imageJ, now working on some plug-in other people wrote
> several years ago.
>
> The problem is, there is a filter plug-in, after it's done, or "undo"
> it, even close the image will not release memory.
>
> My details, we use our own plug-in to open an image, if did nothing
> before close it, I can release memory by click on status bar, as someone
> told before. But after applied this filter, click on status bar won't
> work.
>
> I read some sample filter code on ImageJ site, couldn't find something
> specific to memory release, how can I do it?
>


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: Antwort: free memory

Hao Jiang-3
Thanks, my problem has been solved with help of Wayne, it's because some float arrays hold image data, and the value of every element is calculated using some Math function, which are static.

After I release those static reference when closing my plugin, memory are released. Although I still need to click on status bar force to do it.

Hao
Tel. +1 403.266.0900 x352 |  Fax. +1 403.265.0499  
Calgary, Alberta, Canada


-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Joachim Wesner
Sent: Thursday, May 01, 2008 4:37 PM
To: [hidden email]
Subject: Antwort: free memory

Hi Hao,

what exactly is your problem? That the plugin does not seem to free memory when it should (maybe checking with "Monitor Memory") or do you really run out of memory some time?

You must know, Java Garbage Collection does not necessarily free memory, even when called explicitely (in newer versions of Java), it might delay releasing "unused" memory when it´s really  needed for new objects, so "Monitor Memory" does not necessarily give the info you expect.

See this very good article by Albert Cardona

http://imagejdocu.tudor.lu/imagej-documentation-wiki/how-to/imagej-performance-tuning

Joachim

ImageJ Interest Group <[hidden email]> schrieb am 01.05.2008 19:33:07:

> I'm new to imageJ, now working on some plug-in other people wrote
> several years ago.
>
> The problem is, there is a filter plug-in, after it's done, or "undo"
> it, even close the image will not release memory.
>
> My details, we use our own plug-in to open an image, if did nothing
> before close it, I can release memory by click on status bar, as
> someone told before. But after applied this filter, click on status
> bar won't work.
>
> I read some sample filter code on ImageJ site, couldn't find something
> specific to memory release, how can I do it?
>


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________




*************************************************************************
PRIVILEGE AND CONFIDENTIALITY NOTICE:

The information in this email is intended for the named recipients only.
It may contain privileged and confidential information.  If you have
received this communication in error, any use, copying or dissemination
of its contents is strictly prohibited.  Please erase all copies of the
message along with any included attachments and notify Intermap
Technologies or the sender immediately by telephone at the number
indicated on this page.

*************************************************************************