uptechteam / MotionViews-Android

Code Guide: How to create Snapchat-like image stickers and text stickers.
https://blog.uptech.team/how-to-create-snapchat-like-stickers-for-android-50512957c351
MIT License
479 stars 112 forks source link

Deleting an entity #4

Closed kiaanpillay closed 7 years ago

kiaanpillay commented 7 years ago

Correct way to delete and entity? Do we just remove it from the List? Or do we have to release the memory somehow?

AndriyBas commented 7 years ago

@kiaanpillay just removing it from the list would be fine, no memory leaks. However, if you want to optimize memory usage as much as possible, you can call .release() on the entity, this will recycle entity bitmap if any immediately (calling bitmap.recycle())