TotalCross / totalcross

TotalCross is a Software Development Kit that helps cross platform application development. Currently supported platforms are: Windows, Wince, Android, iOS, Linux and Linux ARM for embedded systems.
https://www.totalcross.com
GNU Lesser General Public License v2.1
220 stars 40 forks source link

Safety of delete in releaseProc for skia_makeBitmap #289

Open flsobral opened 3 years ago

flsobral commented 3 years ago

I am ok with first implementation because It says the void* is an array and the members memory chunk is 4 byte. The "operator" is extra expression since it is for class inside operator overloading The new implementation is super dangerous, we should use global 'sized delete[]' operator (Cpp14) to release the memory without leaking and safely.

_Originally posted by @Farshid-Monhaseri in https://github.com/TotalCross/totalcross/pull/127#discussion_r562304518_