1

This is a follow up to this post, but it's a little different so I felt it warranted a new question. Basically, Visual Studio has stopped outputting both printfs and memory leak info (I'm working on a DirectX app). After some digging, I've found fmod seems to be preventing VS from printing memory leak information. Specifically, if I comment out:

ERRCHECK(mSystem->init(32, FMOD_INIT_NORMAL, 0));

all my output returns. Has anybody seen this before? Any ideas?

Community
  • 1
  • 1
mike
  • 536
  • 1
  • 6
  • 16

1 Answers1

0

Do you have this problem with the examples?

I'm not sure what would cause your problem, but FMOD doesn't includes any CRT debugging hooks or code that would interfere with memory leak info that I'm aware of. Memory debugging is working for me in the FMOD examples.

Can you make sure you are linking with the debug library of the CRT. i.e. C/C++ -> Code Generation -> Runtime Library = /MDd or /MTd

Mathew Block
  • 1,613
  • 1
  • 10
  • 9
  • the examples don't seem to print any leak information. and yes, i am running in debug mode. however, being console applications, printf() works fine in the examples. if you put something like "int* trash = new int[100];" in the playSound project, does it show a leak? – mike Oct 30 '11 at 23:56
  • Yes, FMOD doesn't have any leak logging, what I meant was if you add that code does it work as expected? – Mathew Block Oct 31 '11 at 00:13
  • so, if i add this: ` #if defined(DEBUG) | defined(_DEBUG) int nOldState = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG); _CrtSetDbgFlag(nOldState | _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); #define _CRTDBG_MAP_ALLOC #define _INC_MALLOC #endif int* ui=snew int[90]; ` i would expect to get a reported memory leak, but i don't. am i missing something? – mike Oct 31 '11 at 00:47