wso2 / jaggery

The delicious Javascript framework
Apache License 2.0
115 stars 175 forks source link

Fix potential memory leak in setTimeout() and setInterval() #180

Closed fschaefer closed 6 years ago

fschaefer commented 6 years ago

removeTasks() will be called first on unloadTenant(), which does not have to happen. So the ScheduledFutures stored in the tasks HashMap may never be removed. This commit releases the ScheduledFuture on clearTimeout() / clearInterval() or when the setTimeout() completes.

Kishanthan commented 6 years ago

@TanyaM , @this , can you please review and merge?

this commented 6 years ago

@manuranga Can you have a look?