Strydr Posted December 1, 2018 Share Posted December 1, 2018 I would like to make sure that I'm understanding some basic usage and not creating memory problems (or any other type of problems) Usage scenario would be to do a quick gdi+ operation and then loop again. The specific operation shouldn't be important for this, as far as I know. So, as I understand things, the usage would go somewhat like this: Startup gdi+ go into loop perform operations return once loop is completed, dispose/delete temp images used. shutdown gdi+ The 2 specific things that I'd like to confirm are: 1)start gdi+ before loop and close it after loop, as opposed to starting and stopping it in each loop session. 2)delete and dispose of temp images used in operations AFTER loop is exited. The theory being that the memory used is overwritten each loop, as opposed to written sequentially, which could eat a lot of memory. Thank you for your help! ps: I'm really good at NOT including the basics that you need to answer my questions: sorry if I missed something again. Link to comment Share on other sites More sharing options...
Nine Posted December 1, 2018 Share Posted December 1, 2018 Yes to question 1 no doubt Maybe to question 2 depending of the code you are using, if for example you read different part of the screen, or load different images, etc, you may need to dispose at each action... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Strydr Posted December 1, 2018 Author Share Posted December 1, 2018 The image would be different (same location, tho) each loop, with the possibility of different sizes. Interesting! Sounds as if it would be safer to clean up. Any idea if there are there any appreciable performance hits or other issues by cleaning up after each loop? (I would imagine that this is a stupid question, but I have to ask) Link to comment Share on other sites More sharing options...
Nine Posted December 1, 2018 Share Posted December 1, 2018 idk you gonna have to test yourself, but i'd say marginal impact, take way longer to create bitmap and reading files or creating screen shot. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy 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