Click here to Skip to main content
15,888,293 members
Home / Discussions / C#
   

C#

 
AnswerRe: ClickEventHandler fireing twice !! Pin
Pete O'Hanlon30-Jul-12 22:25
mvePete O'Hanlon30-Jul-12 22:25 
GeneralRe: ClickEventHandler fireing twice !! Pin
Riadh1s30-Jul-12 22:42
Riadh1s30-Jul-12 22:42 
GeneralRe: ClickEventHandler fireing twice !! Pin
Pete O'Hanlon30-Jul-12 23:00
mvePete O'Hanlon30-Jul-12 23:00 
GeneralRe: ClickEventHandler fireing twice !! Pin
Riadh1s30-Jul-12 23:24
Riadh1s30-Jul-12 23:24 
GeneralRe: ClickEventHandler fireing twice !! Pin
Pete O'Hanlon31-Jul-12 0:03
mvePete O'Hanlon31-Jul-12 0:03 
GeneralRe: ClickEventHandler fireing twice !! Pin
Riadh1s31-Jul-12 0:24
Riadh1s31-Jul-12 0:24 
GeneralRe: ClickEventHandler fireing twice !! Pin
Pete O'Hanlon31-Jul-12 0:28
mvePete O'Hanlon31-Jul-12 0:28 
Questionhow to clear memory Pin
Ronenb30-Jul-12 21:52
Ronenb30-Jul-12 21:52 
Hi
I’ve extremely log file that I need to parse, 700M
I need to read the file content and parse each line,
The problem is that I get exception System.outofmemory

In order to solved the memory issue, I think of reading the file in pages

I think of defile pageSize to be 100,000 lines
In order clean memory of array such as fileLinesContent, I think of defining it as null or to call Array.Clean(fileLinesContent)
Is it correct approach to clean memory of array?


string []fileLinesContent;
internal void ReadFile(int pageSize)
{

//To clean memory for garbage collector
fileLinesContent=null;
List<string> fileLines = new List<string>();
int linesNumRead=0;
string line;
while (linesNumRead < pageSize && !srLog.EndOfStream )
{

line = srLog.ReadLine();
linesNumRead ++;
}
fileLinesContent = fileLines.ToArray();
}
}
AnswerRe: how to clear memory Pin
Eddy Vluggen30-Jul-12 23:40
professionalEddy Vluggen30-Jul-12 23:40 
GeneralRe: how to clear memory Pin
Ronenb30-Jul-12 23:45
Ronenb30-Jul-12 23:45 
AnswerRe: how to clear memory Pin
Eddy Vluggen31-Jul-12 0:10
professionalEddy Vluggen31-Jul-12 0:10 
GeneralRe: how to clear memory Pin
Ronenb31-Jul-12 3:02
Ronenb31-Jul-12 3:02 
AnswerRe: how to clear memory Pin
Eddy Vluggen31-Jul-12 3:12
professionalEddy Vluggen31-Jul-12 3:12 
GeneralRe: how to clear memory Pin
Pete O'Hanlon31-Jul-12 3:13
mvePete O'Hanlon31-Jul-12 3:13 
QuestionRe: how to clear memory Pin
Eddy Vluggen31-Jul-12 3:18
professionalEddy Vluggen31-Jul-12 3:18 
AnswerRe: how to clear memory Pin
Pete O'Hanlon31-Jul-12 3:27
mvePete O'Hanlon31-Jul-12 3:27 
GeneralRe: how to clear memory Pin
Eddy Vluggen31-Jul-12 5:05
professionalEddy Vluggen31-Jul-12 5:05 
GeneralRe: how to clear memory Pin
Ronenb31-Jul-12 3:21
Ronenb31-Jul-12 3:21 
AnswerRe: how to clear memory Pin
Ed Hill _5_31-Jul-12 3:20
Ed Hill _5_31-Jul-12 3:20 
GeneralRe: how to clear memory Pin
Ronenb31-Jul-12 3:32
Ronenb31-Jul-12 3:32 
GeneralRe: how to clear memory Pin
Ed Hill _5_31-Jul-12 3:40
Ed Hill _5_31-Jul-12 3:40 
GeneralRe: how to clear memory Pin
Dave Kreskowiak31-Jul-12 4:29
mveDave Kreskowiak31-Jul-12 4:29 
GeneralRe: how to clear memory Pin
Ronenb1-Aug-12 0:08
Ronenb1-Aug-12 0:08 
AnswerRe: how to clear memory Pin
BobJanova31-Jul-12 0:31
BobJanova31-Jul-12 0:31 
AnswerRe: how to clear memory Pin
Ennis Ray Lynch, Jr.31-Jul-12 4:52
Ennis Ray Lynch, Jr.31-Jul-12 4:52 

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.