From 5a2c6626226ea11fd98c02f97a182605177fcf08 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 24 Aug 2009 20:45:06 -0500 Subject: [PATCH] tools.destructors: leaks now tracks leaks globally --- basis/tools/destructors/destructors.factor | 4 ++-- core/destructors/destructors.factor | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/basis/tools/destructors/destructors.factor b/basis/tools/destructors/destructors.factor index d032b5291a..c0aa35b049 100644 --- a/basis/tools/destructors/destructors.factor +++ b/basis/tools/destructors/destructors.factor @@ -44,8 +44,8 @@ PRIVATE> : leaks ( quot -- ) disposables get clone - debug-leaks? on + t debug-leaks? set-global [ [ call disposables get clone ] dip - ] [ ] [ debug-leaks? off ] cleanup + ] [ ] [ f debug-leaks? set-global ] cleanup assoc-diff (disposables.) ; inline diff --git a/core/destructors/destructors.factor b/core/destructors/destructors.factor index 4190cdaaf5..3e57f498af 100644 --- a/core/destructors/destructors.factor +++ b/core/destructors/destructors.factor @@ -17,7 +17,7 @@ SYMBOL: debug-leaks? SLOT: continuation : register-disposable ( obj -- ) - debug-leaks? get [ continuation >>continuation ] when + debug-leaks? get-global [ continuation >>continuation ] when disposables get conjoin ; : unregister-disposable ( obj -- )