![]() |
40 bytes memory leak |
Post Reply
|
| Author | |
jortola
Groupie
Joined: 17 June 2008 Location: Spain Status: Offline Points: 17 |
Post Options
Thanks(0)
Quote Reply
Topic: 40 bytes memory leakPosted: 22 October 2008 at 7:54am |
|
CArray<CXTPTopLevelWndMsgNotifier::CLIENT_INFO,CXTPTopLevelWndMsgNotifier::CLIENT_INFO &>::SetSize CArray<CXTPTopLevelWndMsgNotifier::CLIENT_INFO,CXTPTopLevelWndMsgNotifier::CLIENT_INFO &>::SetAtGrow CArray<CXTPTopLevelWndMsgNotifier::CLIENT_INFO,CXTPTopLevelWndMsgNotifier::CLIENT_INFO &>::Add \xtptoplevelwndmsgnotifier.cpp (86): CXTPTopLevelWndMsgNotifier::Advise \xtpcalendarcontrol.cpp (190): CXTPCalendarControl::CXTPCalendarControl vld memory profiler informed about 40 bytes memory leak in this trace... is there any "fast" way to solve this?Thx.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 October 2008 at 5:41am |
|
Hi,
What Visual Studio IDE show ?
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jortola
Groupie
Joined: 17 June 2008 Location: Spain Status: Offline Points: 17 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 October 2008 at 10:35am |
|
VS8 + SP1 (2005) |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 24 October 2008 at 1:48am |
|
I mean does IDE show leaks ?
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jortola
Groupie
Joined: 17 June 2008 Location: Spain Status: Offline Points: 17 |
Post Options
Thanks(0)
Quote Reply
Posted: 29 October 2008 at 10:24am |
|
Yes, the IDE shows and 'unknown' leak, and the memory profiler indicates that that leak is produced from calendar. |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 29 October 2008 at 4:08pm |
|
Last question - do you see same after run our sample ?
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jortola
Groupie
Joined: 17 June 2008 Location: Spain Status: Offline Points: 17 |
Post Options
Thanks(0)
Quote Reply
Posted: 31 October 2008 at 4:33am |
|
Nop, but the main difference between your sample and my app is that in your sample you use MDI (or SDI) and I dont embebe the calendar control in any window because I'm just using the sheduler part (OnReminders). So I derive a class from your CXTPCalendarControl class and just declare a object of this class.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 31 October 2008 at 9:07am |
|
Hi,
Can you attach sample to show it ?
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jortola
Groupie
Joined: 17 June 2008 Location: Spain Status: Offline Points: 17 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 November 2008 at 2:17am |
|
Sorry for the long sheet of code.
//File CCalendar.h
class CCalendar : public CXTPCalendarControl //File CCalendar.cpp void CCalendar::OnReminders(XTP_NOTIFY_CODE Event, WPARAM wParam , LPARAM lParam) int eAction = (int)wParam; switch (eAction) calRemindersManager->GetActiveReminders(calRemindersL); for (int i = 0; i < calRemindersL.GetCount(); i++)
//get some events data //Main |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 November 2008 at 5:49am |
|
Hi,
Problem that CXTPCalendarControl has own sink and think its main reason.
Try change it to
class CCalendar {
public: bool StartSchedule(); ... protected: DECLARE_XTP_SINK(CCalendar, m_Sink); void OnReminders(XTP_NOTIFY_CODE Event, WPARAM wParam , LPARAM lParam); ... CXTPCalendarControl m_wndCalendar }; |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jortola
Groupie
Joined: 17 June 2008 Location: Spain Status: Offline Points: 17 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 November 2008 at 6:15am |
|
It worked perfect, no leaks, working correct. Thanks for your help oleg. Great job.
Mmm.. I've just realized that I'm in AX forums, not MFC. srry.
|
|
![]() |
|
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 |