Print Page | Close Window

Memoryleaks?

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=120
Printed Date: 17 May 2024 at 12:01am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Memoryleaks?
Posted By: samuli
Subject: Memoryleaks?
Date Posted: 07 August 2003 at 1:04am

Hi!

I was testing your Xtreme Toolkit Pro (evaluation version) for Visual Studio 6. I created some toolbars, status bar, and a docking window. Now, when debugging the app, it gives me _alot_ of memory leaks, which definetly comes from your toolkit. Is there any un-initializations or special destructotr which i should call? I tried to look through your samples, but it seemed, that there wasn't any.

I was thinking to buy a license, but if don't support visual studio 6 (or the toolkit is that buggy), i probably won't...

Can anyone help?



-------------
-- Samuli



Replies:
Posted By: blindemann
Date Posted: 08 August 2003 at 5:53pm

Hi,

This is Bob at Codejock support.

There should not be any memory leaks. I will pass this information on to the developers and I will get back to you about this. This is a high priority issue. It would be nice if you sent me the project so that we could specifically identify the issue. You can send it to mailto:support@codejock.com - support@codejock.com and I will get it.

Thanks,

Bob



Posted By: kstowell
Date Posted: 09 August 2003 at 10:05am

Hi Samuli,

If you are using the layout manager to save and restore panel layouts, you have free any memory that was allocated by calling "CreateLayout()", if you do not free this memory, you will see memory leaks.  Here is an example...

Allocate a new panel layout:

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
        return -1;
    ...

    // Allocate memory for panel layout
.
    m_pRunLayout = GetDockingPaneManager()->CreateLayout();

    ...

    return
0;
}

Free the memory allocated for the panel layout:

void CMainFrame::OnDestroy()
{
    CMDIFrameWnd::OnDestroy();

    ...

    // free allocated memory
    delete
m_pRunLayout;
}

Please see the 'PaneSample'  for complete implementation details, let us know if this helps.

Cheers,

Kirk Stowell
Codejock Support



Posted By: samuli
Date Posted: 11 August 2003 at 5:12am

Hi!

I'm not using any layout managers. I've managed to debug the leaks to the CommandBars. I really don't know, what i'm doing wrong. I followed the examples how to use command bars, but i still got memoryleaks. I sent the source to your support.

 

-- samuli



-------------
-- Samuli


Posted By: blindemann
Date Posted: 11 August 2003 at 2:27pm

Samul.

Thanks for sending us the the code samples which enabled us to find the problem. We have sent you an email but we will answer here also:

1. Remove all code from CMainFrame::~CMainFrame(). it's not necessary.

2. you must remake source code concerned with Docking Panes. Please see DrawClient sample source.

a) Create Docking Panes in CMainFrame::OnCreate

b) m_pwndPaneModelProperties and m_wndCoordsGrid must be members of CGStudioView or CMainFrame.

c) You must call Attach only in XTPWM_DOCKINGPANE_NOTIFY handler.

We are also updating our knowledge base to help with the use of Pro and the migration from Standard to Pro.

Thanks,

Bob



-------------
Bob at Codejock


Posted By: samuli
Date Posted: 11 August 2003 at 2:34pm

Thanks for your help. i'll try that tomorrow and let you know if it worked.

i hope this will help you with your manual updating (no offense, but it's not that "complete" yet, more samples needed, good start though).

but anyway, great toolkit! i'll probably recommend this to my company, if i'll just get those memoryleaks fixed...



-------------
-- Samuli



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