|
-
Dec 21st, 2006, 10:28 PM
#1
Thread Starter
Addicted Member
OutOfMemoryException
What might be the cause for the following during run time? Am I not freeing something?
------------------------
An unhandled exception of type 'System.OutOfMemoryException' occurred in system.windows.forms.dll
Additional information: Error creating window handle.
-
Dec 21st, 2006, 10:32 PM
#2
Re: OutOfMemoryException
What is your app doing when the error is encountered?
-
Dec 21st, 2006, 10:34 PM
#3
Re: OutOfMemoryException
When and where did this happen? Feel free to provide any information that may be relevant.
-
Dec 21st, 2006, 10:46 PM
#4
Re: OutOfMemoryException
 Originally Posted by jmcilhinney
Feel free to provide any information that may be relevant.
You crack me up!
-
Dec 21st, 2006, 10:49 PM
#5
Thread Starter
Addicted Member
Re: OutOfMemoryException
Oh, the problem is gone now... hmmm ... don't know why, I keep hitting ctrl-z to delete whatever I changed earlier, I guess that helps...
I loaded my main page with no problem, then when I tried to bring up a child screen, it died loading this child page. The routine it died at was a button click sub.
Anyways, do I need to worry about memory problem?
-
Dec 21st, 2006, 10:54 PM
#6
Re: OutOfMemoryException
 Originally Posted by newtovbnet
Anyways, do I need to worry about memory problem?
With unmanaged code you should always be sure to dispose objects so they can be released back to open memory. Otherwise, you can fill up the RAM leaving no room for anything else.
-
Dec 21st, 2006, 10:59 PM
#7
Thread Starter
Addicted Member
Re: OutOfMemoryException
So when I close the form, I should always dispose() for OleDbConnection, dataset, datatable etc?
-
Dec 21st, 2006, 11:01 PM
#8
Re: OutOfMemoryException
Closing the form will automatically dispose it's objects, but if you have a sub that may run several times throughout the life of the form, then you need to make sure the objects in the sub are properly disposed.
-
Dec 21st, 2006, 11:03 PM
#9
Thread Starter
Addicted Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|