|
-
Jul 17th, 2007, 03:45 AM
#1
Thread Starter
New Member
Memory problem in VB.NET
I am using VB.NET 2003. My project is working, but time to time displaing an error;
An unhandled exception of type 'System.OutOfMemoryException' occurred in system.windows.forms.dll
Additional information: Error creating window handle.
After restart the Windows this is OK, but after running the project few times, Error raises again.
Always error is raised at a form opening point. That code is below,
Dim frm4 As New Form4
frm4.MdiParent = MdiParent
frm4.Show()
Me.Close()
What can i do this? Should we manually open the garbage Collection?
Please help me. I am a MSc Student and I have to submit my project before end of this month.
Thanks,
Dimuthu
-
Jul 17th, 2007, 04:31 AM
#2
Addicted Member
Re: Memory problem in VB.NET
Stuff created with the New keyword is not being released, a recursive loop that is filling the stack. The debugger might help there. Or a bug, are you using images? There are a few known bugs associated with some types of images. There are also APIs that will check your memory usage, you could set up calls at various points, should be findable on the net.
May be nowt to do with that bit of code, it is just the point by which it has run out.
PS Have found repeated errors cause memory problems, one would assume that handling an error by, say, a Resume Next would prevent that but one never knows.
Last edited by xoggoth; Jul 17th, 2007 at 04:37 AM.
-
Jul 17th, 2007, 06:41 AM
#3
Thread Starter
New Member
Re: Memory problem in VB.NET
Thanks, xoggoth
i am using some images in forms. I will try to check with removing it.
Dimuthu
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
|