From d03d131b18086efc34c546597bbed69226ab1fba 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/SWIG@8532 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/python/exception/example.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Examples/python/exception/example.h b/Examples/python/exception/example.h index aff46568a..4896059f5 100644 --- a/Examples/python/exception/example.h +++ b/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) {