Jump to content

Recommended Posts

Posted

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.

Posted
Posted

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)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...