Re: ImageIO memory issue



Erik wrote:
I have a problem with the ImageIO.read(new File(...)); method. When I
call this method and it reads an image,
but it is not stored in a BufferedImage (or something else), it still
consumes memory. So when only reading
a image and not storing the results, the image is still kept inside
the memory. Also forcing to garbage collect does
not help. Does anyone knows how to release (flush) the ImageIO memory?

Erik
Just because your java programs memory footprint doesn't decrease doesn't mean that the memory is still "consumed". Java uses garbage collection, which may wait an indeterminate amount of time before "freeing" the memory... Unless you are getting OutOfMemoryErrors, don't worry about your memory footprint.

--
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
.



Relevant Pages

  • Re: Autocorrelation matrix of a long sequence
    ... want your Matlab code to run fast you usually exploit all the built-in ... are passed between functions by copy, not by reference, ... This first of all consumes memory but also consumes lots ...
    (comp.dsp)
  • Re: Methods within many instantiated classes?
    ... it, which consumes memory. ... this is a small cost. ... more memory than if you placed the method on the class itself). ... > Jon Skeet - ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ImageIO memory issue
    ... consumes memory. ... Posted via NewsDemon.com - Premium Uncensored Newsgroup Service ... Unlimited Access, Anonymous Accounts, Uncensored Broadband Access ...
    (comp.lang.java.programmer)
  • Tools for memory analysis
    ... I got a VB program which consumes memory a lot. ... studio, VB Watch. ... good and simple tools that can be used to trace memory usage. ...
    (microsoft.public.vb.general.discussion)
  • Re: Code density and performance?
    ... >> quite a bit of research on better locality and packing as ... small and too large for that sort of program. ... similarly for banal programs like 'xterm', which has a memory ... 512B the memory footprint of both 'xterm' and 'ls' above would ...
    (comp.arch)