![]() |
40 bytes memory leak |
Post Reply ![]() |
Author | |
jortola ![]() Groupie ![]() ![]() Joined: 17 June 2008 Location: Spain Status: Offline Points: 17 |
![]() ![]() ![]() ![]() ![]() Posted: 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 ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
What Visual Studio IDE show ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jortola ![]() Groupie ![]() ![]() Joined: 17 June 2008 Location: Spain Status: Offline Points: 17 |
![]() ![]() ![]() ![]() ![]() |
VS8 + SP1 (2005) |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
I mean does IDE show leaks ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jortola ![]() Groupie ![]() ![]() Joined: 17 June 2008 Location: Spain Status: Offline Points: 17 |
![]() ![]() ![]() ![]() ![]() |
Yes, the IDE shows and 'unknown' leak, and the memory profiler indicates that that leak is produced from calendar. |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
![]() ![]() ![]() ![]() ![]() |
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 ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
![]() ![]() ![]() ![]() ![]() |
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 ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
![]() ![]() ![]() ![]() ![]() |
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 |