Thank you for being so fast in answering but in my
application i trace memory used by it and every time i
close my JDialog only 5MB is released(From about 25 MB
Jump) and when i open it again it jumps 25MB so i
donot think that that java reuses memory and this
means that i have about 20MB increase in memory
whenever i open this dialog which is a disaster for my
application since the only solution to free all this
memory is to restart the whole application again which
doesnot make any sense(I Hope that the solution of
Jean-Robert will help) or if any one can provide me
with a final solution please
                          Best Regards
--- Florin Herinean <[EMAIL PROTECTED]> wrote:
> I think there is another explanation for what Jean
> is observing: Windows is
> detecting that the window is no longer fully active,
> and then it discards
> large blocks of unused data. That phenomenon is
> visible with *any* windows
> program. It's part of how Windows handle memory
> usage.
>
> Besides that, java's own memory handling & gc's is
> that way that memory
> allocated from the os is usually not given back, but
> kept as free *java*
> memory. So it is possible that the os will report
> that your app uses 150 mb,
> but out of that you have 100 mb of free memory
> inside java. Next time you'll
> need memory, java will reuse those 100 mb and will
> not ask the os for memory
> exept when it's not enough. That's why in usual java
> (client) programs you
> will see memory usage going only "up" and (almost)
> never "down".
>
> Cheers,
>
> Florin
>   -----Original Message-----
>   From: Discussion list for Java 3D API
> [mailto:[EMAIL PROTECTED] Behalf Of
> Fei Li
>   Sent: Mittwoch, 29. Oktober 2003 23:02
>   To: [EMAIL PROTECTED]
>   Subject: Re: [JAVA3D] Memory leak: A simple idea
>
>
>   Hi Jean,
>
>   From your test I can say it is not memory leak at
> all. It is Java gc
> working. Otherwise you won't get memory back even
> you sleep all day.:)
>
>
>     ----- Original Message -----
>     From: Jean-Robert D'Amore
>     To: [EMAIL PROTECTED]
>     Sent: Wednesday, October 29, 2003 10:47 AM
>     Subject: Re: [JAVA3D] Memory leak: A simple idea
>
>
>     Noticing the same problems with memory leaks,
> here is what I do each
> time I remove/add new graphics to display to force
> freeing memory:
>
>
> mainWindow.setState(Frame.ICONIFIED);
>             try{ Thread.sleep( 20); }
>             catch( InterruptedException ie) {}
>             mainWindow.setState(Frame.NORMAL);
>
>     I know it is not nice, but works very well since
> it may free up to
> 50MB!!
>     Unfortunately, I don't know if it is possible to
> do that with an
> applet....
>
>     Osama Abdalah wrote:
>
> Thank you all for your concern,
>    But if any one have found this problem before and
> solved it please give me a hint since i thing that
> this problem is not a minor one since implementing
> java3D over swing components is not a strange thing
> to
> do,I hope to find a solution soon since this is
> critical for the application i make
>                  Best Regards
> --- Marty Vona <[EMAIL PROTECTED]> wrote:
>   Have you run your app under a tool like Borland
> OptimizeIt, which can show you all live objects on
> the heap, their reference chains, and their
> allocation points?  If not, I suggest that should be
> in your near-term plans.
>
> We have had many memory leaks with our app that we
> would *not* have been able to solve without the help
> of a memory tracing tool like this.  Much more
> information is provided in a much more
> understandable format than what one can get the JVM
> to emit to the console.
>
> Good luck,
> Marty
>
>
> Osama Abdalah writes:
>     thank you for your concern but yet i donot know
>       how to
>     solve this problem it is critical for the
>       application
>     i make
>                           Best regards
> --- Alessandro borges
>       <[EMAIL PROTECTED]>
>     wrote:
>       Hi,
>
>  I just did a test case like you describe: a
>         simple
>     GUI application with a button to open JDialog
>         with a
>     running Canvas3D inside.
>   I have the same behavior: after JDialog opened
> free
> memory decreases, and after closing the JDialog
> there
> is a few MBytes released, but far from that
>         initial
>     value.
>
>  I suspected there are some Java3D threads still
> running, but with my JDeveloper trace tool, I
>         could
>     not note evidence of this. The Java3D threads
>         just
>     stop running as it should be.
>
>  Next try. I run my application with a
> -verbose:class
> option:
> java -verbose:class myApp
>
>  Ok. A big list of loaded classes fill up my
>         console
>     screen. Yeah, Java3D loads a lot of classes,
>         around
>     300, and they are kept in memory for future use.
> This classes are not reloaded when I open the
> JDialog
> a second time.And opens very fast.
>  As gc just take instances, and not the class
> definition, that space taken by classes are not
>         full
>     released.
>  Seens right to me. Just take a lot of memory.
>
>  It is all a got.If someone knows how relase
>         more
>     memory after releasing  Java3D instances, please
> share
> it with us.
>  Ok, have more memory is always a good option ;)
>
> Alessandro
>
>
>  --- Osama Abdalah <[EMAIL PROTECTED]>
> escreveu: > Hi All,
>         Java 3D objects implemented on a JDialog are
>           not
>     cleared after closing the dialog even if i
>           used
>     cleanUp() method of SimpleUniverse , How can i
>           solve
>         this problem
>                Thank you all
>
> __________________________________
> Do you Yahoo!?
> Exclusive Video Premiere - Britney Spears
> http://launch.yahoo.com/promos/britneyspears/
>
>
>
>
===========================================================================
>   To unsubscribe, send email to
>           [EMAIL PROTECTED]
>         and include in the body
> of the message "signoff JAVA3D-INTEREST".  For
> general help, send email to
> [EMAIL PROTECTED] and include in the body
>           of
>     the
>         message "help".
>           Yahoo! Mail - o melhor webmail do Brasil
> http://mail.yahoo.com.br
>
>
>
>
===========================================================================
>   To unsubscribe, send email to
>         [EMAIL PROTECTED]
>     and include in the body
> of the message "signoff JAVA3D-INTEREST".  For
> general help, send email to
> [EMAIL PROTECTED] and include in the body of
>         the
>     message "help".
>
=== message truncated ===


__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to