Click here to Skip to main content
15,886,362 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to "copy local dependencies" in C# !? Pin
Frank Horn28-Jul-08 23:25
Frank Horn28-Jul-08 23:25 
AnswerRe: how to "copy local dependencies" in C# !? Pin
J a a n s24-Jul-08 4:45
professionalJ a a n s24-Jul-08 4:45 
QuestionStruct / Class strange problem Pin
lune1224-Jul-08 4:16
lune1224-Jul-08 4:16 
AnswerRe: Struct / Class strange problem Pin
leppie24-Jul-08 4:31
leppie24-Jul-08 4:31 
AnswerRe: Struct / Class strange problem Pin
User 665824-Jul-08 6:56
User 665824-Jul-08 6:56 
AnswerRe: Struct / Class strange problem Pin
Guffa24-Jul-08 11:10
Guffa24-Jul-08 11:10 
GeneralRe: Struct / Class strange problem Pin
lune1227-Jul-08 21:00
lune1227-Jul-08 21:00 
QuestionKilling a byte array? Pin
Justin Time24-Jul-08 4:06
Justin Time24-Jul-08 4:06 
Hi is there a way to kill a byte array. I am loading images from a file and to instantiate an image class with the data I have to convert my string to a byte array and then stick that into a memory stream and then get the image from that. But my byte arrays are always sticking even after I null and clear them. (According to ANTS memory profiler) I tried forcing the GC to collect the memory and it is still not clearing. The problem is with large files with many images. These arrays take upto 1 gb of ram.

This is the code. Any tips or ways I can fix this problem.

if (mChildNode.FirstChild.Value != string.Empty)
{
   byte[] byteData = System.Convert.FromBase64String(mChildNode.FirstChild.Value);
   MemoryStream stream = new MemoryStream(byteData);
   mImage = new Bitmap(stream);
   stream.Close();
   stream.Dispose();
   stream = null;
   Array.Clear(byteData, 0, byteData.Length);
   byteData = null;

   mChildNode.FirstChild.Value = "";
   mChildNode.FirstChild.Value = null;
}

AnswerRe: Killing a byte array? Pin
Luc Pattyn24-Jul-08 4:33
sitebuilderLuc Pattyn24-Jul-08 4:33 
GeneralRe: Killing a byte array? Pin
Justin Time24-Jul-08 4:48
Justin Time24-Jul-08 4:48 
GeneralRe: Killing a byte array? Pin
Luc Pattyn24-Jul-08 5:02
sitebuilderLuc Pattyn24-Jul-08 5:02 
GeneralRe: Killing a byte array? Pin
Justin Time24-Jul-08 6:07
Justin Time24-Jul-08 6:07 
GeneralRe: Killing a byte array? Pin
Luc Pattyn24-Jul-08 7:27
sitebuilderLuc Pattyn24-Jul-08 7:27 
GeneralRe: Killing a byte array? Pin
Justin Time24-Jul-08 8:14
Justin Time24-Jul-08 8:14 
GeneralRe: Killing a byte array? Pin
Luc Pattyn24-Jul-08 9:06
sitebuilderLuc Pattyn24-Jul-08 9:06 
GeneralRe: Killing a byte array? [modified] Pin
DaveyM6924-Jul-08 23:07
professionalDaveyM6924-Jul-08 23:07 
GeneralRe: Killing a byte array? Pin
Luc Pattyn25-Jul-08 3:44
sitebuilderLuc Pattyn25-Jul-08 3:44 
GeneralRe: Killing a byte array? Pin
Luc Pattyn24-Jul-08 9:28
sitebuilderLuc Pattyn24-Jul-08 9:28 
AnswerRe: Killing a byte array? Pin
leppie24-Jul-08 4:33
leppie24-Jul-08 4:33 
GeneralRe: Killing a byte array? Pin
Justin Time24-Jul-08 4:43
Justin Time24-Jul-08 4:43 
QuestionDisable Browser Pin
Agweet24-Jul-08 3:35
Agweet24-Jul-08 3:35 
AnswerRe: Disable Browser Pin
Pete O'Hanlon24-Jul-08 4:00
mvePete O'Hanlon24-Jul-08 4:00 
GeneralRe: Disable Browser Pin
Agweet24-Jul-08 20:22
Agweet24-Jul-08 20:22 
AnswerRe: Disable Browser Pin
PIEBALDconsult24-Jul-08 6:23
mvePIEBALDconsult24-Jul-08 6:23 
Questionip address Pin
AlexPizzano24-Jul-08 2:16
AlexPizzano24-Jul-08 2:16 

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.