Tpacker | Tpacker - 发送到快捷方式指向错误bugfix
kandi X-RAY | Tpacker Summary
kandi X-RAY | Tpacker Summary
Tpacker
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Tpacker
Tpacker Key Features
Tpacker Examples and Code Snippets
Community Discussions
Trending Discussions on Tpacker
QUESTION
I found a simple binary packer unit online which I altered to fit my needs. It works nicely but I am leaking memory.
TSprite
ANSWER
Answered 2019-Feb-11 at 10:02You explicitly create and destroy the TSprite
used as Root
in the TPacker
class. But SplitNode
creates many more TSprite
objects implicitly in a tree structure. There is no automatism that will clean up these additional objects. These TSprite
s are referenced, though (Down
and Right
), so each TSprite
has references to the additional TSprite
s it was split into and can clean them up. If each one does that clean up, the whole tree will be destroyed recursively.
So the solution is to write a destructor for TSprite
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Tpacker
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page