Skip to content

[Bug] EntityService dispose() doesn't work #10

@ThatTechedGuy

Description

@ThatTechedGuy

Duplicate from: UQdeco2800/2021-ext-studio-2#271

Description

Entity components for a particular Screen are registered to the EntityService. When the EntityService initialized for that particular screen is disposed, the dispose() functions for each component attached to that Entity are not called. Manually calling entity.dispose() works, but ServiceLocator.getEntityService.dispose() does not work.

How to reproduce

The dispose() function of the SettingsMenuDisplay component does not get called when ServiceLocator.getEntityService().dispose() is called on the SettingsScreen, although the corresponding entity is registered to the service as we can see in the createUI() method. Disposing the entity manually in SettingsScreen's dispose() function works.

Temporary Fix

Dispose the entity manually in SettingsScreens dispose() function.

Suggestions: Most probably, the problem is in Entity.java or EntityService.java but I am not sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions