Skip to main content
gamedev.net
🔒 Locked

[java] Preventing Garbage Collection.

Started by S_Merde 4 replies 350+ views
Original Post
S_Merde
S_Merde
How would I go about disabling garbage collecting? Does the JVM support an option to prevent garbage collecting? I''m currently working on a graphics-intensive program, and the garbage collector runs every now and then, causing my program and animations to stop briefly (for about 10 seconds or so). Is there any way to prevent this? Thank you.
buh
buh
Yep: java -Xnoclassgc. You could also try the incremental gc with -Xincgc.

(don''t know if the Xs need to be there)
S_Merde
S_Merde
Ah, okay. Thank you very much.

Merde, Steve
Kaijin
Kaijin
quote:
Original post by buh
Yep: java -Xnoclassgc. You could also try the incremental gc with -Xincgc.

(don''t know if the Xs need to be there)


If you disable GC in this way does that mean that no memory gets released for objects until the program exits?

- Kaijin
buh
buh
yep

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.