summaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2010-12-14 15:19:37 -0300
committerRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2010-12-14 17:40:50 -0300
commitfb4035a69475759e58e25d5aa0f061d6c212f4af (patch)
tree7166c73411f374dbeda8f712c608d7afd650f92a /generator
parentb915f12df2349760309c2f7227bcdbad3c73a7da (diff)
downloadshiboken-fb4035a69475759e58e25d5aa0f061d6c212f4af.tar.gz
shiboken-fb4035a69475759e58e25d5aa0f061d6c212f4af.tar.xz
shiboken-fb4035a69475759e58e25d5aa0f061d6c212f4af.zip
Fix object destruction process to avoid pass a invalid object during the
__del__ function. Fix bug #505 Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'generator')
-rw-r--r--generator/cppgenerator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index 55747d37..5b7b0d03 100644
--- a/generator/cppgenerator.cpp
+++ b/generator/cppgenerator.cpp
@@ -464,7 +464,7 @@ void CppGenerator::writeDestructorNative(QTextStream &s, const AbstractMetaClass
Indentation indentation(INDENT);
s << wrapperName(metaClass) << "::~" << wrapperName(metaClass) << "()" << endl << '{' << endl;
s << INDENT << "SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this);" << endl;
- s << INDENT << "Shiboken::Object::destroy(wrapper);" << endl;
+ s << INDENT << "Shiboken::Object::destroy(wrapper, this);" << endl;
s << '}' << endl;
}