Hi !
Featured games (88)
games approved by the League of Dukes
Games in Showcase (679)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (734)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Releasing memory  (Read 1346 times)
0 Members and 1 Guest are viewing this topic.
Offline Zakk

Innocent Bystander

« Posted 2005-10-05 08:16:48 »

I have a basic 2D application (swing components etc), where I would like to open and close 3D windows. Problem with Xith3D and Java3D is, that when I close these windows, it doesn't release the memory.

Is there a way to make Xith3D or Java3D to release all the memory it used, without exiting the whole program?
Offline Grand Poeba

Junior Devvie

« Reply #1 - Posted 2005-10-05 09:58:55 »

java does this automaticly, no?. with his garbage collector?
Offline Niwak
« Reply #2 - Posted 2005-10-05 11:05:29 »

For the java object, yes. For the native ressource, no (textures, VBO,...).

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Riven

« JGO Overlord »

Medals: 1217
Projects: 4
Exp: 16 years

Hand over your head.

« Reply #3 - Posted 2005-10-05 11:53:17 »

Well, the heap won't shrink, so it's not that visible in the Task Manager, but the used part of the heap will decrease (if you released all references)

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings!
Offline jeep

Senior Newbie

« Reply #4 - Posted 2005-10-09 06:17:45 »

I think he means in OpenGL, if memory is allocated (as in a C struct or array), it isn't released, or is it? memory leaks are usually found in C/C++ because you have to deallocate memory even if there is no longer a reference to it. Probably more of a concern of LWJGL or JOGL than the scene graph API.

Java handles this well with the garbage collector, but it is possible to have objects persist without a desire for them to persist....meaning it doesn't get garbage collected if there is a reference to the object.


public class mainLoop
Scene scene1;
Scene scene2;


// if you are done with scene1, set it to null or else the
// object will linger without being garbage collected.
scene1 = null;

Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

DarkCart (16 views)
2016-05-29 02:30:33

Hydroque (34 views)
2016-05-26 14:45:46

Mac70 (45 views)
2016-05-24 21:16:33

theagentd (49 views)
2016-05-14 18:38:35

theagentd (84 views)
2016-05-10 22:37:41

theagentd (89 views)
2016-05-10 22:33:46

IanParcs (117 views)
2016-04-18 14:18:53

KaiHH (114 views)
2016-04-18 08:35:41

KaiHH (135 views)
2016-04-15 12:43:58

theagentd (141 views)
2016-04-14 02:16:17
FPS Camera Tutorial
by Hydroque
2016-05-22 05:40:58

Website offering 3D Models specifically for games for free
by vusman
2016-05-18 17:23:09

Website offering 3D Models specifically for games for free
by vusman
2016-05-09 08:50:56

Website offering 3D Models specifically for games for free
by vusman
2016-05-06 11:10:21

Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!