Jump to content
  • Advertisement


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


ATL - Default memory leak

This topic is 5720 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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!