Dragging CXTPTaskPanelGroupItem leaks or crashes. |
Post Reply |
Author | |
Mazeppa
Newbie Joined: 31 July 2013 Location: Plano, TX Status: Offline Points: 6 |
Post Options
Thanks(0)
Posted: 17 April 2015 at 12:40pm |
I'm using the Task Panel from ToolKitPro in my MFC app. I allow users to drag items out of the TaskPanel and drop them into an open document. I noticed that a TaskPanelGroupItem was leaking twice every time someone dropped one into a document. The leaks are occurring in my DragOver and Drop methods. In each method, I have code like this:
So I added a delete pItemDrop before the end brace in both cases. This works great in a Debug build and stops the leaks. But in a Release build, it crashes hard the instant I call delete. What should I do to keep it from leaking or crashing?
|
|
Mark Woodard
|
|
Mazeppa
Newbie Joined: 31 July 2013 Location: Plano, TX Status: Offline Points: 6 |
Post Options
Thanks(0)
|
I may have answered my own question. Instead of deleting pItemDrop, I called pItemDrop->ExternalRelease(). That seems to stop the leaks in a Debug build, and it doesn't crash in a Release build. Someone let me know if I should be calling InternalRelease() instead.
|
|
Mark Woodard
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |