File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -324,6 +324,7 @@ struct ImageLoadFlags
324
324
};
325
325
326
326
void initLib (bx::AllocatorI* allocator);
327
+ void shutdownLib ();
327
328
328
329
Image* imageLoad (const char * xmlStr, uint32_t flags, const ShapeAttributes* baseAttrs);
329
330
bool imageSave (const Image* img, bx::WriterI* writer);
Original file line number Diff line number Diff line change @@ -571,6 +571,20 @@ void initLib(bx::AllocatorI* allocator)
571
571
s_ShapeAttrFreeListHead = nullptr ;
572
572
}
573
573
574
+ void shutdownLib ()
575
+ {
576
+ ShapeAttributeFreeListNode* node = s_ShapeAttrFreeListHead;
577
+ while (node) {
578
+ ShapeAttributeFreeListNode* next = node->m_Next ;
579
+
580
+ BX_FREE (s_Allocator, node->m_Attrs );
581
+ BX_FREE (s_Allocator, node);
582
+
583
+ node = next;
584
+ }
585
+ s_ShapeAttrFreeListHead = nullptr ;
586
+ }
587
+
574
588
bool shapeCopy (Shape* dst, const Shape* src, bool copyAttrs)
575
589
{
576
590
const ShapeType::Enum type = src->m_Type ;
You can’t perform that action at this time.
0 commit comments