Search Results

Search found 3 results on 1 pages for 'plazmaz'.

Page 1/1 | 1 

  • Memory leak when changing Text field of a Scintilla object.

    - by PlaZmaZ
    I have a relatively large program that I'm optimizing for ASCII input files around 10-80mB in size. The program reads every line of the file into a stringbuilder and then sets the Text field of the ScintillNET object to the stringbuilder. The stringbuilder is then set to null. private void ReloadFile(string sFile) { txt_log.ResetText(); try { StringBuilder sLine = new StringBuilder(""); using (StreamReader sr = new StreamReader(sFile)) { while (true) { string temp = sr.ReadLine(); if (temp == null) break; sLine.AppendLine(temp); } sr.Close(); } txt_log.Text = sLine.ToString(); sLine = null; } catch (Exception ex) { MessageBox.Show(this, "An error occurred opening this file.\n\n" + ex.Message, "File Open Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } GC.Collect(); } The program has an option to reload or open a file. This is irrelevant, as any call to txt_log.Text seems to not get rid of the previous memory used for the .Text field. Commenting out the txt_log.Text line gives proper memory behavior. The GC.Collect() line seems pointless, and I have tried both with and without it. Is there something I'm missing here? I HIGHLY doubt it's a problem with the ScintillaNET component itself--rather something in this code.

    Read the article

  • RichTextBox Vertical Scrollbar manipulation in visual studio.

    - by PlaZmaZ
    I've searched through related questions but can't find what I need. I have a richtextbox control. I need to trigger an event when the vertical scrollbar reaches a certain position (say 90% down to the bottom). I've been playing around with the events for the rich textbox but have yet to find anything. Any help would be greatly appreciated.

    Read the article

  • Any custom/third party Visual C# text box Controls with extra features?

    - by PlaZmaZ
    I'm writing a program that uses the textbox in visual C# to read a log file. When dealing with very large amounts of text, writing to the textbox is incredibly slow. The textbox also lacks many features. Are there any custom textbox controls that are faster, or even a sort of embedded editor (with ability to highlight certain words, indent, input bookmarks)? Many of the features I want are programmable, but it would be nice if there was a faster textbox or one that already had these features :) Thanks.

    Read the article

1