Print Page | Close Window

Dangling pointer

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=23967
Printed Date: 22 December 2024 at 6:05pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Dangling pointer
Posted By: andreypir
Subject: Dangling pointer
Date Posted: 26 March 2020 at 3:29pm
This code in 19.1 returns a pointer to a deleted heap block:

LPCTSTR CXTPFrameThemeVisualStudio2012::GetStyleResourceName() const
{
CString retVal("XTP_IDR_VS2012_STYLE");
return retVal;
}

In 17.3 it was correct, I am not sure what this bug was introduced for:

LPCTSTR CXTPFrameThemeVisualStudio2012::GetStyleResourceName() const
{
return _T("XTP_IDR_VS2012_STYLE");
}




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