use SAFE_RELEASE to make code cleaner

This commit is contained in:
Rodolfo Bogado 2014-12-06 10:46:15 -03:00
parent 817d025328
commit c2de38c115
1 changed files with 3 additions and 15 deletions

View File

@ -58,21 +58,9 @@ void BBox::Init()
void BBox::Shutdown() void BBox::Shutdown()
{ {
if (s_bbox_buffer != nullptr) SAFE_RELEASE(s_bbox_buffer);
{ SAFE_RELEASE(s_bbox_staging_buffer);
s_bbox_buffer->Release(); SAFE_RELEASE(s_bbox_uav);
s_bbox_buffer = nullptr;
}
if (s_bbox_staging_buffer != nullptr)
{
s_bbox_staging_buffer->Release();
s_bbox_staging_buffer = nullptr;
}
if (s_bbox_uav != nullptr)
{
s_bbox_uav->Release();
s_bbox_uav = nullptr;
}
} }
void BBox::Set(int index, int value) void BBox::Set(int index, int value)