How to cleanly unload TerrainGrid

Hi everyone,

I’m still working on my project and and now I am trying to cleanly load an unload worlds. I can load a first world in my game without any problem but when I unload the first world (made with a terrain grid a lot of attached stuff) and then load a new one, I notice that a new jME TerrainGrid Thread appear and another jME Terrain Thread appears too and they are never eliminated. As I keep unloading/loading worlds, these threads keep piling up. How am I supposed to eliminate the old threads?

Thanks a lot for your help!

They are just single threads created by an executor service, and aren’t doing anything if the terrain is detached. I can, however, have it remove them when it is detached from the scene graph.

1 Like

Hi Sploreg,

Oh, I thought I was doing something wrong. Hum, I guess I would prefer to have them removed. Maybe I won’t be the only one confused by this. But no pressure, do it if and when you want. :slight_smile:

Thanks a lot!

Yea it could lead to someone being confused so it is worth removing them.