Print Page | Close Window

CXTPObservable leaks during XTPShutdown

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=24539
Printed Date: 20 January 2025 at 5:31pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPObservable leaks during XTPShutdown
Posted By: ganzeiss
Subject: CXTPObservable leaks during XTPShutdown
Date Posted: 19 January 2025 at 9:19pm
Hi, I am currently migrating from CodeJock 19.3 to CodeJock 24.0 and found that this issue is occurring to me. I use the static function CXTPPaintManager::SetTheme(xtpThemeVisualStudio2015) to set the theme for the paint manager. 

However, when I call CXTPWinApp::ExitInstance(), and as the app starts to close, when XTPShutdown() is called during ~XTPApplication(), I get an assertion error during:
template<class Owner, class Observer>
AFX_INLINE CXTPObservable<Owner, Observer>::~CXTPObservable()
{
    ASSERT("All observers must be unsubscribed before destruction" && 0 == m_Observers.GetSize());
}

I can use CXTPPaintManager::SetTheme(xtpThemeOffice2000) before calling CXTPWinApp::ExitInstance(), this error doesn't occur. I wanted to ask if there is a more elegant solution, or if this workaround is the only solution at the moment.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net