Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


ATL - Default memory leak

This topic is 5804 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does ATL come with a predefined memory leak? I created a default ATL project and added a default "ATL Control Class" to it (Windowed Only). I added the folowing handles but with no code on any of them: MESSAGE_HANDLER(WM_SIZE, OnSize) MESSAGE_HANDLER(WM_CREATE, OnCreate) MESSAGE_HANDLER(WM_DESTROY,OnDestroy) MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseMove) Then I made a simple visual basic EXE project to test it (which has only one form, the ATL control and the default vb controls). Every time I run this vb EXE and close it I notice that my allocated memory has increased about 300k+. Is this normal? Is there any fix for this? Is it me? Does God exist?

Share this post

Link to post
Share on other sites

#include <memory.h>
#include <malloc.h>
#include <crtdbg.h>

in your atl project.


at the beginning of winmain.

watch debug output when you quit the program; if you have any memory leaks, you''ll be told about them.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!