Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - XTSplitterWnd and Cleanup
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

XTSplitterWnd and Cleanup

 Post Reply Post Reply
Author
Message
MarcoNedwig View Drop Down
Newbie
Newbie


Joined: 13 May 2004
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote MarcoNedwig Quote  Post ReplyReply Direct Link To This Post Topic: XTSplitterWnd and Cleanup
    Posted: 13 May 2004 at 5:04pm

I have a problem using XTSplitterWnd. When I call ReplaceView fiunction the old view is only set to SW_HIDE to activate another view with SW_SHOW. But the old view won't be destroyed and so the application has a memory leak, because the old view isn't set active anymore and memory stays allocated

I solved the problem by doing pOldView->DestroyWindow at the end of the function, but this causes any function at the old view (like OnKillFocus methods) will cause errors, because the view doesn't exist anymore.

My actual way is saving the return value of ReplaceView ( which is the pointer to the old view set to SW_HIDE) and call destroy window after a while ( 30 s). This causes an endless loops after a while( Perhaps a recursive call in DestroyWindow implementation of the MFC). This can be seen with WIN NT 4. WIN 2000 doesn't seem to have this behaviour?

Does anyone has a suggestion or a solution for me?

Back to Top
thodgson View Drop Down
Groupie
Groupie


Joined: 11 August 2003
Status: Offline
Points: 78
Post Options Post Options   Thanks (0) Thanks(0)   Quote thodgson Quote  Post ReplyReply Direct Link To This Post Posted: 11 September 2004 at 5:06pm
I am using ReplaceView in my application and was wondering if this issue has been addressed.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.281 seconds.