Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[memory leak] Утекает ресурс в окне О Программе #1252

Closed
pavel-pimenov opened this issue Aug 24, 2015 · 3 comments

Comments

@pavel-pimenov
Copy link
Owner

From Pavel.Pimenov@gmail.com on August 02, 2013 07:31:13

Visual Leak Detector detected 30 memory leaks (5664 bytes).
---------- Block 465134 at 0x0AFEF7C8: 74 bytes ----------
Call Stack:
c:\vc10\r5xx\wtl\atlctrlx.h (1459): flylinkdc_Debug.exe!WTL::CHyperLinkImplWTL::CHyperLink,ATL::CWindow,ATL::CWinTraits<1442840576,0 >::Init + 0x23 bytes
c:\vc10\r5xx\wtl\atlctrlx.h (1072): flylinkdc_Debug.exe!WTL::CHyperLinkImplWTL::CHyperLink,ATL::CWindow,ATL::CWinTraits<1442840576,0 >::SubclassWindow
c:\vc10\r5xx\windows\wtl_flylinkdc.h (40): flylinkdc_Debug.exe!CFlyHyperLink::init
c:\vc10\r5xx\windows\aboutdlg.h (159): flylinkdc_Debug.exe!AboutDlg::OnInitDialog
c:\vc10\r5xx\windows\aboutdlg.h (55): flylinkdc_Debug.exe!AboutDlg::ProcessWindowMessage + 0x28 bytes
c:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\atlwin.h (3859): flylinkdc_Debug.exe!ATL::CDialogImplBaseTATL::CWindow::DialogProc + 0x27 bytes
c:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\atlwin.h (3982): flylinkdc_Debug.exe!ATL::CDialogImpl<AboutDlg,ATL::CWindow>::Create + 0x22 bytes
c:\vc10\r5xx\windows\aboutdlgindex.h (59): flylinkdc_Debug.exe!AboutDlgIndex::OnInitDialog
c:\vc10\r5xx\windows\aboutdlgindex.h (32): flylinkdc_Debug.exe!AboutDlgIndex::ProcessWindowMessage + 0x28 bytes

  1. Нарушение стиля кодирования - мемебры классе без префикса m_
    AboutDlg* pPage1;
    AboutCmdsDlg* pPage2;
  2. Когда делаешь new - не забывай делать парный delete в деструкторе или еще лучше - используй умные указатели
    pPage1 = new AboutDlg();
    pPage2 = new AboutCmdsDlg();

Дима прошу причесать свой код!
Чтобы запомнилось выбери путь сложнее через умные указатели.

Original issue: http://code.google.com/p/flylinkdc/issues/detail?id=1215

@pavel-pimenov
Copy link
Owner Author

From zippoz...@gmail.com on August 02, 2013 01:45:15

Status: Started

@pavel-pimenov
Copy link
Owner Author

From zippoz...@gmail.com on August 02, 2013 01:57:27

r14861

@pavel-pimenov
Copy link
Owner Author

From tret2...@gmail.com on August 03, 2013 09:28:33

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant