#include "stdafx.h" #include "CloneAppRecipe.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif int main() { CloneAppRecipe t; // cree un leak t.connectPtrTestMem(); getchar(); return 0; } void CloneAppRecipe::connectPtrTestMem() { //m_ptrTestMem is a boost::shared_ptr m_ptrTestMem->ConnectSignalTriplePtrTab(boost::bind(&CloneAppRecipe::test, this)); } void CloneAppRecipe::test() const { } void CTestMem::ConnectSignalTriplePtrTab(const TypeSignaTest::slot_type& slot) { //m_ptrTestTab are boost::shared_ptr m_ptrTestTab1->ConnectSignal(slot); m_ptrTestTab2->ConnectSignal(slot); m_ptrTestTab3->ConnectSignal(slot); } void CTestTab::ConnectSignal(const TypeSignalTest::slot_type& slot) { m_SignalTest->connect(slot); } CTestTab::~CTestTab() { m_SignalTest->disconnect_all_slots(); }