Compile source of OCC with VS2005

I successfully compiled source of OCC with VS2005. It sames all right, but all samples have memery leakage. In my opinion, it is caused by the different default setting of vs2005 and vs2003. Could anyone have the experience tell me am I right and how to correct it.


Mikael Aronsson's picture


First you should have a look at some old posts about this in the archive.

Visual studio will print out a message about memory leaks for any object that is not deleted before the application terminates, this does NOT mean that it is a memory leak.

One example is that you allocate a single object at the start and use this through out the lifetime of the application and igonore to delete it at termination, this is not a memory leak but will be displayed as such by VS.

OCC use it's own memory allocator and I guess this allocates lots of big chunks that is then used to allocate smaller objects and it is possible that it is those you see.

But then, of course it is also possible that you do have a memory leak...,
in the end, to get any use of the leak detector in VS you must have applications and libraries that free all objects at the end vene if it not needed, otherwise you ruin the idea with the leak detector.


白晓亮(Bai Xiaolian's picture

Every thing is right. And no memory leakage detected while I changed the setting of OCC according to old posts.

Win Than Aung's picture

xlbai, how did you change the setting of OCC according to old posts. could you please let me know?

Marco Matt's picture

are you able to debug Draw Test Harness?

白晓亮(Bai Xiaolian's picture

Sorry, I do not known how to debut draw test harness.

白晓亮(Bai Xiaolian's picture

Sorry, I do not known how to debug draw test harness.