Click here to Skip to main content
15,887,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Just wondered if you could please help me with this: I had my code working in a couple days, but as I tried running it as for today..it keeps giving me this ERROR " A first chance exception of type 'System.OutOfMemoryException' occurred in PresentationFramework.dll" This is a WPF Application and I get this Error in all the pages. I tried Memory Diagnosing tool...but there no problem with the memory. Everytime I debug..the solution uses a high amount of memory.. please Help


![This is what I get when I run the solution, it brings this error in almost all the pages every time they are initialized ][1]




[1]: http://i.stack.imgur.com/AnPZ0.png [1]
Posted
Comments
[no name] 11-Aug-14 11:40am    
Why would you think that there would be a problem with your memory? Your application is simply using up all of the memory allocated to it.
Member 10007566 11-Aug-14 12:01pm    
As I go throgh forums, i got to the one that talked about using "Memory diagnostic tool"; would you please elaborate your answer...
[no name] 11-Aug-14 12:10pm    
There is nothing to "elaborate" on. You are allocating so much memory in your program that you are using up the available memory. Why is that so hard for you to comprehend?
Member 10007566 11-Aug-14 11:54am    
HOW to fix that?
[no name] 11-Aug-14 11:57am    
You would fix that by not using so much memory.

1 solution

Just by the error message it is impossible to tell you what's wrong. There are a thousand different ways for you to run the machine out of memory.

But, usually, this is because you either:

A) Allocated objects but never released all references to them and continued to allocate more objects, thereby running the machine out of memory,

B) You're not calling Dispose on objects that you really should be calling Dispose on. As a rule of thumb, if an object has a Dispose method, call it when you're done with the object!
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 11-Aug-14 12:57pm    
Reasonable enough,, considering the amount of the information given in the question; a 5.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900