tools.destructors: leaks now tracks leaks globally
parent
4c758c4306
commit
5a2c662622
|
@ -44,8 +44,8 @@ PRIVATE>
|
||||||
|
|
||||||
: leaks ( quot -- )
|
: leaks ( quot -- )
|
||||||
disposables get clone
|
disposables get clone
|
||||||
debug-leaks? on
|
t debug-leaks? set-global
|
||||||
[
|
[
|
||||||
[ call disposables get clone ] dip
|
[ call disposables get clone ] dip
|
||||||
] [ ] [ debug-leaks? off ] cleanup
|
] [ ] [ f debug-leaks? set-global ] cleanup
|
||||||
assoc-diff (disposables.) ; inline
|
assoc-diff (disposables.) ; inline
|
||||||
|
|
|
@ -17,7 +17,7 @@ SYMBOL: debug-leaks?
|
||||||
SLOT: continuation
|
SLOT: continuation
|
||||||
|
|
||||||
: register-disposable ( obj -- )
|
: register-disposable ( obj -- )
|
||||||
debug-leaks? get [ continuation >>continuation ] when
|
debug-leaks? get-global [ continuation >>continuation ] when
|
||||||
disposables get conjoin ;
|
disposables get conjoin ;
|
||||||
|
|
||||||
: unregister-disposable ( obj -- )
|
: unregister-disposable ( obj -- )
|
||||||
|
|
Loading…
Reference in New Issue