Fixing memory leak with not removed events
This commit is contained in:
parent
d0a65f7f4f
commit
9eef107d56
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hibas123/utils",
|
||||
"version": "2.0.2",
|
||||
"version": "2.0.3",
|
||||
"description": "Different Utilities, that are not worth own packages",
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
|
@ -69,6 +69,7 @@ export default class Observable<T = any> {
|
||||
this.subscriberCollect.forEach(cb => {
|
||||
cb(this.events)
|
||||
});
|
||||
this.events = [];
|
||||
this.timeout = undefined;
|
||||
}, this.collect_intervall);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user