--
[ Picked text/plain from multipart/alternative ]
If you have some time to explain to me how I have to interprete those
memleaks, i'd be greatfull.

See for the source @ http://sourceforge.net/projects/betastrike/

What I tried:
- CM3.cpp, put a breakpoint @ constructor
- _BaseWeapon.cpp, same
- h_export.cpp, put a breakpoint just when you enter the function.

Then how it breaks:
1/ Baseweapon
2/ baseweapon
3/ h_export
4/ baseweapon
then when i type /quit

it only breaks once @ baseweapon destructor...

then i get this from _CrtMemDifference:

0 bytes in 0 Free Blocks.
60980 bytes in 383 Normal Blocks.
120 bytes in 5 CRT Blocks.
0 bytes in 0 Ignore Blocks.
0 bytes in 0 Client Blocks.
Largest number used: 61220 bytes.
Total allocations: 65316 bytes.

And when HL closes I get like this: (small extraction from it)

Data: <Counter-Terroris> 43 6F 75 6E 74 65 72 2D 54 65 72 72 6F 72 69 73
{47} normal block at 0x0AD71F70, 10 bytes long.
Data: <Terrorist > 54 65 72 72 6F 72 69 73 74 00
{46} normal block at 0x0AD71FB0, 4 bytes long.
Data: <VIP > 56 49 50 00
{45} normal block at 0x0AD71FE0, 11 bytes long.
Data: <Spectators > 53 70 65 63 74 61 74 6F 72 73 00
{44} normal block at 0x0AD70030, 19 bytes long.
Data: <Counter-Terroris> 43 6F 75 6E 74 65 72 2D 54 65 72 72 6F 72 69 73
{43} normal block at 0x0AD70070, 11 bytes long.
Data: <Terrorists > 54 65 72 72 6F 72 69 73 74 73 00


So that is ... Afaik everywhere were I use KString.

But as botman said @ wavelength forum. I don't derive KString from
CBaseEntity, neither do I use new in there (have to check that, but i'm
pretty sure i only use _strdup). I do use delete in there though... May
that be a problem?

So if it's possible for anyone in here to teach me how to solve 1 memory
leak, I think I will be able to handle the others on my own.

Another detail:
On the MSDN site they say something like break when program starts (  Where
is that anyway ), put _crtBreakAlloc in Watchwindow & modify the value (for
example to 43 in my case). Then when I run, it asks me for dbgheap.c... I
press cancel & go into assembly mode. Then I hit shift-f11 twice I guess...
Then I'm asked for strdup.c... hit shift-f11 again and then I'm within the
constructor of KString where it copies the inputted value using _strdup.

But the strange thing here is, that if I use KString in another program, it
works without memleaks. So it should be that thing botman said, the
new/delete of CBaseEntity, but I can't catch it...

So if anyone could be so kind as to lighten my path?



G00fy, (aka KaReL, aka Steven)

Main Webpage : http://komma.cjb.net
CQ Database  : http://lid.fragland.net/
ICQ #        : 35217584
MSN          : [EMAIL PROTECTED]

--

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to