Skip to content

NotificationManager leaves hanging timer threads #9

@DerpaholicRex

Description

@DerpaholicRex

When creating a notification via
plain.addNotification(notification, Time.seconds(2));

A timer thread is created and never cleaned up (likely RemoveTimer at notificationManager line 64)

After the notification closes the thread remains running in memory until application termination, causing resource leak and preventing application close without system.exit().

This is easily visible debugging the demo app code in eclipse and watching the threads created.

This problem can be worked around by the following code block

        plain.addNotification(notification, Time.infinite());
	Thread.sleep(2000);
	plain.removeNotification(notification);

Resulting in no lingering thread and system terminating properly upon successful completion.

I will use this work around for my personal uses, I am creating this issue to document the workaround and the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions