c# - Make RAM size free for .NET application -


i have created grid images booklet pages on wpf form. when run application system ram memory size 1.02 gb (includes other running applications). when turn each page ram size increases kb. when turn more 150 pages out of memory exception. understand exception caused because there no space in ram open new pages on application , tried following:

     1. bitmapimage image = new bitmapimage();         image.dispose();         image = null;        2. gc.collect();        3.[dllimport("psapi.dll")]     public static extern bool emptyworkingset(intptr hprocess);  public freemem(string programname){        emptyworkingset(process.getcurrentprocess().handle);       foreach(process process in process.getprocesses(programname))       {             try             {                 emptyworkingset(process.handle);             }             catch (exception)             {                 ...             }       }  } 

but couldn't solve problem. can make me clear , solve this?


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -