From 70a0044ac5ec55b5b113647e8afcac688d2baa45 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 23 Jul 2018 15:41:54 -0400 Subject: [PATCH] added memory leak warning --- src/misc/sequentialize.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/misc/sequentialize.ts b/src/misc/sequentialize.ts index 46b665f64bf..c3e330f7edb 100644 --- a/src/misc/sequentialize.ts +++ b/src/misc/sequentialize.ts @@ -5,6 +5,8 @@ * be returned, instead of calling the original function again * * Results are not cached, once the promise has returned, the next call will result in a fresh call + * + * WARNING: The decorator's scope is singleton, so using it on transient objects can lead to memory leaks. */ export function sequentialize(cacheKey: (args: any[]) => string) { return (target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {