Phaser Posted October 18, 2014 Share Posted October 18, 2014 Hi Guys I am doing extensive work on a screen capture using GDI+, I would like someone to explain where and when to dispose of any $hImage =_GDIPlus_ImageLoadFromFile("pic.bmp") or createfrombitmap functions do some work on it, may be 2 or 3 different clones, atleast 1 _GDIPlus_ImageDispose($hImage) or should I dispose after each bit of work then load it again, or do I just add any var name to the end of my script just before _GDIPlus_Shutdown() Link to comment Share on other sites More sharing options...
mikell Posted October 18, 2014 Share Posted October 18, 2014 You should create the $hImage, do on it all the work to do and then Dispose when this $hImage is no more needed in the script So you can place _GDIPlus_ImageDispose($hImage) just before _GDIPlus_Shutdown(), or just after the whole work on $hImage, or just before another load if you need to create another $hImage to work on a different image Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now