<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : CXTPObservable leaks during XTPShutdown</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : CXTPObservable leaks during XTPShutdown]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 03 Apr 2026 18:13:17 +0000</pubDate>
  <lastBuildDate>Tue, 25 Feb 2025 07:32:56 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=24539</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[CXTPObservable leaks during XTPShutdown : Hello,How I written early, between...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24539&amp;PID=79157&amp;title=cxtpobservable-leaks-during-xtpshutdown#79157</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9012">agontarenko</a><br /><strong>Subject:</strong> 24539<br /><strong>Posted:</strong> 25 February 2025 at 7:32am<br /><br />Hello,<br><br>How I written early, between 19.3 and 24.1 many changes were.<br>Was unified use of themes, because our samples used themes code differently (part of our samples already changed with new code based on wizard).<br>Codejock application wizard has been added in Visual Studio.<br>So ideally you need to create with our wizard application like as you have. And modify you sample like wizard sample.<br><br>Pay attention to CXTPWinApp and ExitInstance() usage.<br>Example:<br>int CCommandBarControlsApp::ExitInstance()<br>{<br>&nbsp;&nbsp;&nbsp; // TODO: handle additional resources you may have added<br>&nbsp;&nbsp;&nbsp; AfxOleTerm(FALSE);<br><br>&nbsp;&nbsp;&nbsp; return CXTPWinApp::ExitInstance();/// &lt;&lt;--<br>}<br><br>Regards,<br>Artem Gonarenko]]>
   </description>
   <pubDate>Tue, 25 Feb 2025 07:32:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24539&amp;PID=79157&amp;title=cxtpobservable-leaks-during-xtpshutdown#79157</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPObservable leaks during XTPShutdown : Hiagontarenko,I tried the method...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24539&amp;PID=79140&amp;title=cxtpobservable-leaks-during-xtpshutdown#79140</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9692">ganzeiss</a><br /><strong>Subject:</strong> 24539<br /><strong>Posted:</strong> 06 February 2025 at 5:45am<br /><br />Hi&nbsp;agontarenko,<div><br></div><div>I tried the method you mentioned previously in replacing&nbsp;<span style=": rgb248, 248, 252;">CXTPPaintManager::SetTheme() call with&nbsp;</span><span style=": rgb248, 248, 252;">XTPPaintManager()-&gt;SetTheme(nTheme), but the issue still persisted. It's very strange, since we did not have this issue in 19.3.0, but it showed up suddenly in 24.0.0.</span></div><div><span style=": rgb248, 248, 252;"><br></span></div><div><span style=": rgb248, 248, 252;">I have been trying to recreate the issue with Samples from the CodeJock toolkit, but I am unable to recreate the issue through the samples. Trying to separate the problematic portion from the affected software is also quite difficult.</span></div><div><span style=": rgb248, 248, 252;"><br></span></div><div><span style=": rgb248, 248, 252;">Other than the workaround of setting&nbsp;</span><span style=": rgb248, 248, 252;">CXTPPaintManager::SetTheme(xtpThemeOffice2000), I found another where I run the following before executing CXTPWinApp::ExitInstance() :</span></div><div><span style=": rgb248, 248, 252;"><br></span></div><div><span style=": rgb248, 248, 252;"><div>auto RefCount = CXTPPaintManager::GetInstanceAddRef();</div><div>&nbsp; DWORD nOldRefCount = RefCount-&gt;InternalRelease();</div><div>&nbsp; while (1 &lt; RefCount-&gt;InternalRelease())</div><div>&nbsp; &nbsp; ;</div><div><br></div><div>Which I still feel is a bit of weird workaround. I will try to reply with a Sample of the issue as soon as I can, but at the moment, this is the only information I can really scrounge up.</div><div><br></div><div>Note: I am not sure if this is relevant, but to make CodeJock 24.0.0 work with our code, we had to remove the following macro _XTP_EXCLUDE_MARKUP from our code (although doing this for the software in 19.3.0 did not yield the same issue)</div></span></div>]]>
   </description>
   <pubDate>Thu, 06 Feb 2025 05:45:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24539&amp;PID=79140&amp;title=cxtpobservable-leaks-during-xtpshutdown#79140</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPObservable leaks during XTPShutdown : Can you provide sample with this...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24539&amp;PID=79135&amp;title=cxtpobservable-leaks-during-xtpshutdown#79135</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9012">agontarenko</a><br /><strong>Subject:</strong> 24539<br /><strong>Posted:</strong> 04 February 2025 at 9:11am<br /><br /><div>Can you provide sample with this problem?</div><div><br></div><div><div>Regards,</div>Artem Gonarenko</div>]]>
   </description>
   <pubDate>Tue, 04 Feb 2025 09:11:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24539&amp;PID=79135&amp;title=cxtpobservable-leaks-during-xtpshutdown#79135</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPObservable leaks during XTPShutdown : Hello,It seems that quite a bit...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24539&amp;PID=79134&amp;title=cxtpobservable-leaks-during-xtpshutdown#79134</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9012">agontarenko</a><br /><strong>Subject:</strong> 24539<br /><strong>Posted:</strong> 04 February 2025 at 9:05am<br /><br /><div>Hello,</div><div><br></div><div>It seems that quite a bit of time has passed between these revisions.<br>We have modified application themes, now it uses XTPPaintManager()-&gt;SetTheme(nTheme); call instead of CXTPPaintManager::SetTheme(), maybe this is the problem.</div><div><br></div><div>Please see how this is implemented in CommandBarControls.</div><br><div>Regards,</div><div>Artem Gonarenko<br></div>]]>
   </description>
   <pubDate>Tue, 04 Feb 2025 09:05:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24539&amp;PID=79134&amp;title=cxtpobservable-leaks-during-xtpshutdown#79134</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPObservable leaks during XTPShutdown : Hi, I am currently migrating from...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24539&amp;PID=79111&amp;title=cxtpobservable-leaks-during-xtpshutdown#79111</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9692">ganzeiss</a><br /><strong>Subject:</strong> 24539<br /><strong>Posted:</strong> 19 January 2025 at 9:19pm<br /><br />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.&nbsp;<div><br></div><div>However, when I call&nbsp;CXTPWinApp::ExitInstance(), and as the app starts to close, when XTPShutdown() is called during ~XTPApplication(), I get an assertion error during:<br>template&lt;class Owner, class Observer&gt;<br>AFX_INLINE CXTPObservable&lt;Owner, Observer&gt;::~CXTPObservable()<br>{<br>&nbsp;&nbsp; &nbsp;ASSERT("All observers must be unsubscribed before destruction" &amp;&amp; 0 == m_Observers.GetSize());<br>}<br><br>I can use&nbsp;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.</div>]]>
   </description>
   <pubDate>Sun, 19 Jan 2025 21:19:16 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24539&amp;PID=79111&amp;title=cxtpobservable-leaks-during-xtpshutdown#79111</guid>
  </item> 
 </channel>
</rss>