mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
more deterministics names for event leakage tracing (#215950)
This commit is contained in:
parent
934307f5be
commit
24ca2600ce
|
@ -831,13 +831,15 @@ export function setGlobalLeakWarningThreshold(n: number): IDisposable {
|
|||
|
||||
class LeakageMonitor {
|
||||
|
||||
private static _idPool = 1;
|
||||
|
||||
private _stacks: Map<string, number> | undefined;
|
||||
private _warnCountdown: number = 0;
|
||||
|
||||
constructor(
|
||||
private readonly _errorHandler: (err: Error) => void,
|
||||
readonly threshold: number,
|
||||
readonly name: string = Math.random().toString(18).slice(2, 5),
|
||||
readonly name: string = (LeakageMonitor._idPool++).toString(16).padStart(3, '0')
|
||||
) { }
|
||||
|
||||
dispose(): void {
|
||||
|
|
Loading…
Reference in a new issue