Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (636)
Games in Android Showcase (178)
games submitted by our members
Games in WIP (686)
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  
  Java3D & garbage collection  (Read 1863 times)
0 Members and 1 Guest are viewing this topic.
Offline The_Wyvern

Junior Newbie

Java games rock!

« Posted 2003-02-15 20:46:43 »

I'm developing an Italian Poker game in Java3D.
I'm new in Java2 and Java3D programming and I'm experiencing problems with memory.

In the game I build a SimpleUniverse with several BranchGroups which can be detached at runtime, each containing a lot of TransformGroups.
There's also a dedicated BranchGroup for Behaviors.
Each detached Branchgroup is eliminated immediately, calling the gc.

myDetachedBG = null;

At the end of the game, I call


to free memory and start a new game.
Unfortunately only a small amount of memory is collected, and when I start the game again it begins to grow.
I don't think it's a problem of circular reference.

Can you help me?
Thanx and excuse me if my English is not so good.
Offline Herkules

Senior Devvie

Friendly fire isn't friendly!

« Reply #1 - Posted 2003-02-16 06:30:29 »

You are not alone.

AFAIK there are known memory leaks and probably unknown ones. We experience the same where the leaks seems to be somewhere around TriangleStripArray. Unfortunately, this is for our terrain so the leak is really big (~10MB). But I've not been able to isolate it. Maybe you can?

Currently there's a Java3D beta on the way, so it would be cool if such leaks could be eliminated before RC.

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline The_Wyvern

Junior Newbie

Java games rock!

« Reply #2 - Posted 2003-02-18 12:04:48 »

Unfortunately I wasn't able to isolate the leak. I'm wondering if the problem is about BranchGroup detaching.
In fact I used to remove some animations by detaching their parent bg, and then I used to null-sign them to make them eligible for gc.
Maybe Java GC can't handle detached complex SceneGraphs?
As I told you I'm new in Java programming, and probably I'm wrong.
But I don't think Sun's  Vanilla GC is as smart as they say!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline vrm

Junior Devvie

where I should sign ?

« Reply #3 - Posted 2003-02-18 12:49:45 »

tryed with :
   -Xincgc           enable incremental garbage collection
Offline The_Wyvern

Junior Newbie

Java games rock!

« Reply #4 - Posted 2003-02-19 11:22:08 »

I executed my program with the incremental GC on, but I got only little benefits.
I tried also to execute with "java verbose:gc ..." on and noticed leaks of 10-15 mb every time I rebuild my SceneGraph. Memory usage grows until java.lang.OutOfMemory!!!!
Yesterday I searched a lot and I found some evidence about leaks in :<init>(<init>(

What do you think about these? the way. I use jdk1.4.1 and java3D1.3.1OGL
Offline Herkules

Senior Devvie

Friendly fire isn't friendly!

« Reply #5 - Posted 2003-02-19 12:03:19 »

There is a current discussion on memory leaks in the context of picking on the Java3D mailing list.
I didn't follow the discussion so I don't know any details.

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Dwinin (68 views)
2015-11-07 13:29:08

Rems19 (77 views)
2015-10-31 01:36:56

Rems19 (69 views)
2015-10-31 01:32:37

williamwoles (104 views)
2015-10-23 10:42:59

williamwoles (91 views)
2015-10-23 10:42:45

Jervac_ (105 views)
2015-10-18 23:29:12

DarkCart (132 views)
2015-10-16 00:58:11

KaiHH (115 views)
2015-10-11 14:10:14

KaiHH (153 views)
2015-10-11 13:26:18

BurntPizza (167 views)
2015-10-08 03:11:46
Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30

Rendering resources
by Roquen
2015-10-15 07:40:48

Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11 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!