kbhit memory leak in Visual Studio 8 Beta 2 debug bulds

G

Guest

This code:

---snip---
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <stdio.h>
#include <tchar.h>
#include <conio.h>

int _tmain(int argc, _TCHAR* argv[])
{
bool bQuit=false;
printf("Press ESC to quit.\n");
while(!bQuit)
{
if(kbhit())
{
if(getch()==27)
{
bQuit=true;
};
};
};
printf("done.\n");
return 0;
}
---snap---

leaks like there's no tomorrow in VS8b2 CPP debug console builds.

One would think that there's no that much that can go wrong with kbhit().
Release builds are ok.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top