vs2019  link with libredwg-0.12.5.5140-win64

Dwg_Data* pDoc = dwg_new_Document(R_2000, 0, 0);
Dwg_Object* poMSpace = dwg_model_space_object(pDoc);
Dwg_Object_BLOCK_HEADER* pMSpace = poMSpace->tio.object->tio.BLOCK_HEADER;
dwg_point_3d start = { 0 };
dwg_point_3d end = { 0 };
dwg_add_LINE(pMSpace, &start, &end);
dwg_free_Document(pDoc);
dwg_free(pDoc);
free(pDoc);

will crash
remove free(pDoc); will cause memory leak.
So we need to do memory isolation ?
Memory management isolation
This is a GitHub Issue
repo:libredwg
owner:LibreDWG
Title : Memory management isolation
Issue date:

--- start body ---
vs2019  link with libredwg-0.12.5.5140-win64

Dwg_Data* pDoc = dwg_new_Document(R_2000, 0, 0);
Dwg_Object* poMSpace = dwg_model_space_object(pDoc);
Dwg_Object_BLOCK_HEADER* pMSpace = poMSpace->tio.object->tio.BLOCK_HEADER;
dwg_point_3d start = { 0 };
dwg_point_3d end = { 0 };
dwg_add_LINE(pMSpace, &start, &end);
dwg_free_Document(pDoc);
dwg_free(pDoc);
free(pDoc);

will crash
remove free(pDoc); will cause memory leak.
So we need to do memory isolation ?
--- end body ---
