VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

CHAMELEON BUTTON 2.0.6 Memory Leak FIX

Cody Rutkowski  (4 Submissions)   Graphics   Advanced   Wed 3rd February 2021

When using the chameleon button user control I noticed that eventually the application will begin to run out of resources. I was extremely curious to what was causing it, and decided to identify the problem. Using the vbAccelerator GUI Resource Tracer (www.vbaccelerator.com), I was able to find the cause of the problem. In the procedure DrawFrame(...) the memory leak occurs. I implemented DeleteObject calls for the hPen and hObject. Originally the code would only call DeleteObject on the value of hObject and not hPen. Hope anyone that uses the chameleon button user control finds this helpful. This user control is hosted on this website incase you are unfamiliar with it.

API Declarations
' Replace the existing procedure with the procedure provided below.

Rate CHAMELEON BUTTON 2.0.6 Memory Leak FIX (6(6 Vote))
CHAMELEON BUTTON 2.0.6 Memory Leak FIX.bas

CHAMELEON BUTTON 2.0.6 Memory Leak FIX Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters