Public Group

# References on Release + Oddities

This topic is 3634 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I've been told a couple of times about seeking out invalid/null pointers and the like, but I am obviously missing something. I can't tell you how much I wish I just... Understood this! I get the nagging feeling this is simpler than I'm making it. I adopted a method from another coder to check for references. This is the function called once the program is ready to close. This is pretty primitive, I know. I tried using sprintf, and sprintf_s for param 1 of MessageBox along with a 256 byte buffer, but all of the characters showed up as outlined squares/unknown characters. (Why is this...? If you are going to suggest a project setting change, please walk me through that and what I should watch for)
void CloseDirect3D()
{
int RefC;
RefC = d3ddev->Release();
if (RefC > 0)
{
MessageBox(NULL, L"d3ddev", L"ERROR", MB_OK);
}

RefC = d3dspr->Release();
if (RefC > 0)
{
MessageBox(NULL, L"d3d", L"ERROR", MB_OK);
}
RefC = d3d->Release();
if (RefC > 0)
{
MessageBox(NULL, L"Error releasing d3d", L"ERROR", MB_OK);
}
return;
}


d3ddev and d3d had some extra references, and I'm trying to fight these errors as well, (I'm not sure if they are relevant) Direct3D9: (ERROR) :GetClientRect Failed ? Direct3D9: (ERROR) :GetClientRect Failed ? Direct3D9: (ERROR) :BitBlt or StretchBlt failed in Present I am ensuring that my models and sprites (in structs) are being released properly. They have the same method for destructors, and I saw no box for them. The same can be said for the mesh textures.

1. 1
Rutin
26
2. 2
3. 3
4. 4
5. 5

• 9
• 11
• 10
• 13
• 20
• ### Forum Statistics

• Total Topics
632948
• Total Posts
3009390
• ### Who's Online (See full list)

There are no registered users currently online

×