Need help with Direct Play
I am having some problems with unhandled exceptions with Direct Play and memory leaks. I initialize DP at the startup of my game (no probs here). If I exit the game without trying to connect then there are unhandled exceptions with releasing the DP object, local address device, and host address device. If I exit the game during a connection attempt or while it's connected I get unhandled exceptions and a bunch of assembler spit out at me.
Here is my destructor code:
if( dpClient && connected == true)
{
// Close our connection
dpClient->Close(0);
// Release the DirectPlay object
}
CloseHandle( ConnectCompleteEvent );
SAFE_RELEASE( dpClient ); //unhandled exception if not connected
SAFE_RELEASE( device_address ); //same as dpClient
SAFE_RELEASE( host_address ); //same as dpClient
Here are some of the assertion errors that show up in the debug console:
COMMON:0:fff77bef:fff78a53:************************************************************
COMMON:0:fff77bef:fff78a53:ASSERTION FAILED! File: d:\nt_chk\multimedia\directx\dplay\dnet\common\fpm.cpp Line: 214: 0
COMMON:0:fff77bef:fff78a53:************************************************************
COMMON:0:fff77bef:fff78a53:************************************************************
COMMON:0:fff77bef:fff78a53:ASSERTION FAILED! File: d:\nt_chk\multimedia\directx\dplay\dnet\common\fpm.cpp Line: 214: 0
COMMON:0:fff77bef:fff78a53:************************************************************
COMMON:0:fff77bef:fff78a53:DirectPlay8 memory leak detected! ( #1 of 8 )68 bytes leaked at address 0x04a0fb10!
Any help would be appreciated, thanks.
-Corillian
Edited by - Corillian on August 5, 2001 1:45:11 PM
It''s only as bloated as you make it.
Anywayz, from the source you posted I''m assuming you''re using DPlay 8.
Have you looked at the sample source included with the SDK?
You should follow that source and see how it works and then implement it into your project.
Ben
Icarus Independent
Jump Down The Rabbithole
Anywayz, from the source you posted I''m assuming you''re using DPlay 8.
Have you looked at the sample source included with the SDK?
You should follow that source and see how it works and then implement it into your project.
Ben
Icarus Independent
Jump Down The Rabbithole
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement