void Bitmap::Reset() { if (id.IsDefined() || !pathName.empty()) { RemoveSurfaceListener(*this); id = ResourceId::Null(); pathName.clear(); } delete texture; texture = nullptr; }
void Bitmap::Reset() { if (id != 0 || !pathName.empty()) { RemoveSurfaceListener(*this); id = 0; pathName.clear(); } delete texture; texture = NULL; }
void Bitmap::reset() { if (id == 0) { assert(texture == NULL); return; } RemoveSurfaceListener(*this); id = 0; delete texture; texture = NULL; }
void BufferCanvas::Destroy() { assert(!active); if (IsDefined()) { RemoveSurfaceListener(*this); delete stencil_buffer; stencil_buffer = nullptr; delete frame_buffer; frame_buffer = nullptr; delete texture; texture = nullptr; } }
RawBitmap::~RawBitmap() { RemoveSurfaceListener(*this); delete texture; }