mirror of https://github.com/axmolengine/axmol.git
fix copy construct & assignment operator memory leakage.
This commit is contained in:
parent
d2bc03f80f
commit
223d5a7a5c
|
@ -44,7 +44,7 @@ isVertsOwner(true),
|
|||
rect()
|
||||
{
|
||||
filename = other.filename;
|
||||
isVertsOwner = other.isVertsOwner;
|
||||
isVertsOwner = true;
|
||||
rect = other.rect;
|
||||
triangles.verts = new V3F_C4B_T2F[other.triangles.vertCount];
|
||||
triangles.indices = new unsigned short[other.triangles.indexCount];
|
||||
|
@ -60,7 +60,7 @@ PolygonInfo& PolygonInfo::operator= (const PolygonInfo& other)
|
|||
{
|
||||
releaseVertsAndIndices();
|
||||
filename = other.filename;
|
||||
isVertsOwner = other.isVertsOwner;
|
||||
isVertsOwner = true;
|
||||
rect = other.rect;
|
||||
triangles.verts = new V3F_C4B_T2F[other.triangles.vertCount];
|
||||
triangles.indices = new unsigned short[other.triangles.indexCount];
|
||||
|
|
Loading…
Reference in New Issue