Click here to Skip to main content
15,890,506 members
Home / Discussions / C#
   

C#

 
GeneralRe: Looking for ideas on how to release memory right before a generation 3 garbage collection Pin
puri keemti3-Dec-09 23:50
puri keemti3-Dec-09 23:50 
RantRe: Looking for ideas on how to release memory right before a generation 3 garbage collection Pin
GWBas1c4-Dec-09 0:09
GWBas1c4-Dec-09 0:09 
GeneralRe: Looking for ideas on how to release memory right before a generation 3 garbage collection Pin
Shameel4-Dec-09 0:12
professionalShameel4-Dec-09 0:12 
AnswerRe: Looking for ideas on how to release memory right before a generation 3 garbage collection Pin
Dave Kreskowiak4-Dec-09 3:45
mveDave Kreskowiak4-Dec-09 3:45 
GeneralRe: Looking for ideas on how to release memory right before a generation 3 garbage collection Pin
GWBas1c4-Dec-09 4:02
GWBas1c4-Dec-09 4:02 
AnswerRe: Looking for ideas on how to release memory right before a generation 3 garbage collection Pin
Alan Balkany4-Dec-09 4:15
Alan Balkany4-Dec-09 4:15 
GeneralRe: Looking for ideas on how to release memory right before a generation 3 garbage collection Pin
GWBas1c4-Dec-09 10:43
GWBas1c4-Dec-09 10:43 
AnswerRe: Looking for ideas on how to release memory right before a generation 3 garbage collection Pin
Gideon Engelberth4-Dec-09 4:30
Gideon Engelberth4-Dec-09 4:30 
It's your app, so you know if this is possible, but I would try to resturcture the logic so I do not need to be accessing the same file repeatedly to the point where I'm keeping a cache of files. If you are only accessing a file once every 10 minutes, I would assume that the performance gain from caching the string will be small.

If the Mono garbage collector works like the .NET one, the Large Object Heap may be what you need. (I do not claim to be a Large Object expert. I've only read the first article that comes up on Google about it. [1][2]) If the resulting string from the file is >85K in size, the string should get placed on the LOH and will thus not get collected except in a full collection. If the files are smaller than that and you still need to cache them, you may be able to hack something together with a large finalizable object, but I wouldn't recommend it.

If that doesn't work, you probably need a more defined caching policy than "keep them as long as the process has memory."
GeneralRe: Looking for ideas on how to release memory right before a generation 3 garbage collection Pin
GWBas1c4-Dec-09 10:50
GWBas1c4-Dec-09 10:50 
AnswerRe: Looking for ideas on how to release memory right before a generation 3 garbage collection Pin
Natza Mitzi6-Dec-09 10:18
Natza Mitzi6-Dec-09 10:18 
RantRe: Looking for ideas on how to release memory right before a generation 3 garbage collection Pin
GWBas1c6-Dec-09 18:53
GWBas1c6-Dec-09 18:53 
QuestionIs this an acceptable way to make a Control Array? [modified] Pin
Randal Vance Cunanan3-Dec-09 17:22
Randal Vance Cunanan3-Dec-09 17:22 
AnswerRe: Is this an acceptable way to make a Control Array? Pin
Abhinav S3-Dec-09 17:49
Abhinav S3-Dec-09 17:49 
GeneralRe: Is this an acceptable way to make a Control Array? Pin
Randal Vance Cunanan3-Dec-09 17:59
Randal Vance Cunanan3-Dec-09 17:59 
AnswerRe: Is this an acceptable way to make a Control Array? Pin
dan!sh 3-Dec-09 18:29
professional dan!sh 3-Dec-09 18:29 
AnswerRe: Is this an acceptable way to make a Control Array? Pin
GWBas1c3-Dec-09 19:29
GWBas1c3-Dec-09 19:29 
AnswerRe: Is this an acceptable way to make a Control Array? [modified] Pin
puri keemti3-Dec-09 22:22
puri keemti3-Dec-09 22:22 
AnswerRe: Is this an acceptable way to make a Control Array? Pin
Shameel3-Dec-09 23:34
professionalShameel3-Dec-09 23:34 
AnswerRe: Is this an acceptable way to make a Control Array? Pin
freakyit3-Dec-09 23:39
freakyit3-Dec-09 23:39 
AnswerRe: Is this an acceptable way to make a Control Array? Pin
PIEBALDconsult4-Dec-09 4:04
mvePIEBALDconsult4-Dec-09 4:04 
QuestionString Manipulation Pin
CoderOnline3-Dec-09 17:15
CoderOnline3-Dec-09 17:15 
GeneralRe: String Manipulation Pin
Abhinav S3-Dec-09 17:46
Abhinav S3-Dec-09 17:46 
GeneralRe: String Manipulation Pin
CoderOnline3-Dec-09 18:08
CoderOnline3-Dec-09 18:08 
GeneralRe: String Manipulation Pin
Abhinav S3-Dec-09 18:23
Abhinav S3-Dec-09 18:23 
GeneralRe: String Manipulation Pin
CoderOnline3-Dec-09 18:27
CoderOnline3-Dec-09 18:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.