From 3ec85199d5f2cd887c85a85c99f742892a306dfc Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 19 Dec 2017 16:07:16 +0800 Subject: [PATCH] Corrects the wrong logic of using delete to remove memory allocated by malloc. (#1036) --- native/cocos/editor-support/creator/CCGraphicsNode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native/cocos/editor-support/creator/CCGraphicsNode.cpp b/native/cocos/editor-support/creator/CCGraphicsNode.cpp index 6de8e6fbea..bd6fd2338f 100644 --- a/native/cocos/editor-support/creator/CCGraphicsNode.cpp +++ b/native/cocos/editor-support/creator/CCGraphicsNode.cpp @@ -70,8 +70,8 @@ GraphicsBuffer::GraphicsBuffer() GraphicsBuffer::~GraphicsBuffer() { - CC_SAFE_DELETE(verts); - CC_SAFE_DELETE(indices); + CC_SAFE_FREE(verts); + CC_SAFE_FREE(indices); } bool GraphicsBuffer::allocVerts(int vertsCount)