Oh! I see! ... so it may be a bug :D ... that's why it was so difficult
:P ... anyway, thx for advertising me of the 1.3.1 beta1 I will try it
... and for those who do not like using beta softwares/APIs I can tell
that the approach of keeping references to the textures components (i.e.
bufferedImage, writableRasterizer, ImageComponent etc) and modifying the
texture pixels through this way, is stable ... now my application is
running and it makes changes to the textures in a per-frame basis
(actually hundreds of pixels) and no memory leak occurs. ;)



-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED] On Behalf Of Kelvin Chung
Sent: Thursday, February 27, 2003 11:59 AM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] Out of memory with textures

Risto Rangel-Kuoppa wrote:

>I got it, and I would like to share my experience with however is
>interested.  My problem was that I had a set of textures which I was
>changing its images constantly during execution, but the way I was
doing
>it is by recregreating the buffered image, the writable rasterizer etc
>etc etc and reapplying them to the textures.  My logic says, that this
>would replace the previous things and the garbage collector would
>release the resources.  But surprise! it did not so "Out of memory"
>occurred.  But I noticed something strange, if I let the application
>running without changing the textures after some time, I was able to
>continue changing them but I had to stop and let the application "rest"
>so I could continue changing the textures without running out of
memory.
>So I think there should be some low level thread that would be
releasing
>the resources and that it would only run only when there was nothing
>else to process.  So, my second step was to explicitly invoke the
>garbage collector, but another surprise, I still had to let the
>application "rest" before continuing changing textures.  This makes me
>think that the release of resources is happening some level in the
>DirectX rather than in the virtual machine, or at least, there is no
>synchronization of these releases and the application code (because of
>the behavior explained above).  So, to solve my problem I kept a
>reference to absolutely everything in the textures and modify their
>contents without regenerating the textures and replacing them.  And it
>works.
>
>If anyone has any comments, feel free to tell them.
>
>

This might relate to the following bug in J3D v1.3 release :

4748837 Memory leak when new texture is set in Appearance

which is fixed in v1.3.1 beta1.

- Kelvin
---------------
Java 3D Team
Sun Microsystems Inc.

========================================================================
===
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".

===========================================================================
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