From be4d57cd5775d5bc18f2a274dcd1282d45e86ab6 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Mon, 23 Jan 2006 23:37:14 +0000 Subject: [PATCH] fix memory leak git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8532 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Examples/python/exception/example.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SWIG/Examples/python/exception/example.h b/SWIG/Examples/python/exception/example.h index aff46568a..4896059f5 100644 --- a/SWIG/Examples/python/exception/example.h +++ b/SWIG/Examples/python/exception/example.h @@ -30,8 +30,9 @@ public: throw(Exc(42,"Hosed")); return 1; } - int unknown() throw(A) { - throw A(); + int unknown() throw(A*) { + static A a; + throw &a; return 1; } int multi(int x) throw(int, const char *, Exc) {