kotcrab / vis-ui

libGDX UI toolkit
Apache License 2.0
727 stars 128 forks source link

Artemis system's dispose not called on Gdx.app.exit() #204

Closed Deepscorn closed 8 years ago

Deepscorn commented 8 years ago

How to reproduce: Checked out your https://github.com/kotcrab/viseditor-superjumper-demo, updated sources, set breakpoint in dispose() of SpriteBoundsCreator.java. It's not called

Deepscorn commented 8 years ago

It's called when you use Artemis odb directly as usual:

public class ArtemisOnlyGame extends ApplicationAdapter {

    @Override
    public void create() {
        super.create();

        final WorldConfiguration config = new WorldConfigurationBuilder()
                .with(
                        new RegularShapeRendererSystem(camera)
                ).build();

        world = new World(config);

        new Timer().scheduleTask(new Timer.Task() {
            @Override
            public void run() {
                Gdx.app.exit();
            }
        }, 5F);
    }

    @Override
    public void render() {
        world.setDelta(Gdx.graphics.getDeltaTime());
        world.process();
    }

    @Override
    public void dispose() {
        world.dispose();
    }
}
kotcrab commented 8 years ago

Thanks!

Deepscorn commented 8 years ago

Thank you! Will check soon. And thanks for great work!

Deepscorn commented 8 years ago

Checked, it is fixed now