PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Handling Out-of-memory Condition in .NET CF 1.1
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Handling Out-of-memory Condition in .NET CF 1.1
![]() |
Handling Out-of-memory Condition in .NET CF 1.1 |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I have serious trouble handling gracefully the out-of-memory condition
using .NET CF 1.1. First of all, I could not find a way to intercept the WM_HIBERNATE message(I could not think of a way to do it even using Win32) which means that my app is clueless as of when the system runs out of memory. Second, and even worse, if the system runs out of memory while my app has not constructed its main form yet(e.g. during InitializeComponent() call in a form has many controls) I cannot even get the WM_HIBERNATE. And even worse than that - if in this moment the system displays the out-of-memory dialog(OOM) my app is not listed there since it has no window yet. So, the user does not even get the option to stop it. Generally, I could not find any consistent way to detect or handle the out-of-memory conditions. The Win32 functions like GlobalMemoryStatus and SHCloseApps are no good either because their results are highly volatile, i.e. more memory can be released or consumed by some process right after they return. Can somebody offer some assistance? |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

