Click here to Skip to main content
15,907,281 members
Home / Discussions / C#
   

C#

 
Questionhow to call an array inside a sortedlist? Pin
kharr102727-Jul-03 13:07
kharr102727-Jul-03 13:07 
GeneralSecurity a la Palladium ¿? ;) Pin
antoine@orchus-tech27-Jul-03 12:34
antoine@orchus-tech27-Jul-03 12:34 
GeneralRe: Security a la Palladium ¿? ;) Pin
Alex Korchemniy27-Jul-03 18:13
Alex Korchemniy27-Jul-03 18:13 
GeneralRe: Security a la Palladium ¿? ;) Pin
StealthyMark27-Jul-03 23:27
StealthyMark27-Jul-03 23:27 
GeneralListboxes Pin
StorBruze27-Jul-03 10:31
StorBruze27-Jul-03 10:31 
GeneralRe: Listboxes Pin
Alex Korchemniy27-Jul-03 18:20
Alex Korchemniy27-Jul-03 18:20 
QuestionHow to restart windows from c# code? Pin
Member 9627-Jul-03 9:17
Member 9627-Jul-03 9:17 
AnswerRe: How to restart windows from c# code? Pin
Mazdak27-Jul-03 9:48
Mazdak27-Jul-03 9:48 
AnswerRe: How to restart windows from c# code? Pin
Erick Sgarbi27-Jul-03 15:10
Erick Sgarbi27-Jul-03 15:10 
QuestionAdvanced Log Capabilities ? Pin
Andres Manggini27-Jul-03 8:51
Andres Manggini27-Jul-03 8:51 
GeneralTabbing to next edit box using Enter key Pin
IrishSonic27-Jul-03 8:23
IrishSonic27-Jul-03 8:23 
GeneralRe: Tabbing to next edit box using Enter key Pin
kharr102727-Jul-03 13:13
kharr102727-Jul-03 13:13 
GeneralRe: Tabbing to next edit box using Enter key Pin
dynamic27-Jul-03 13:36
dynamic27-Jul-03 13:36 
GeneralRe: Tabbing to next edit box using Enter key Pin
eggie527-Jul-03 19:07
eggie527-Jul-03 19:07 
GeneralEmbedded Resources Pin
Brian Delahunty27-Jul-03 4:35
Brian Delahunty27-Jul-03 4:35 
GeneralRe: Embedded Resources Pin
leppie27-Jul-03 5:23
leppie27-Jul-03 5:23 
GeneralRe: Embedded Resources Pin
Brian Delahunty27-Jul-03 5:29
Brian Delahunty27-Jul-03 5:29 
GeneralRe: Embedded Resources Pin
leppie27-Jul-03 5:35
leppie27-Jul-03 5:35 
GeneralRe: Embedded Resources Pin
Nick Parker27-Jul-03 18:22
protectorNick Parker27-Jul-03 18:22 
QuestionRelease memory quickly? Pin
novachen26-Jul-03 23:38
novachen26-Jul-03 23:38 
Hi!

I write a simple image processing tookit in c#. I face a trouble that c# seems didn't release the garbage. because my image is fairly large (around 6000*6000), it is very apparent. After several operations, physical used up, the pc works very slowly.

Give a simple example. There is a picturebox in the form, in form_load, load a 6000*6000 gray image into picturebox.

Then

private void button1_Click(object sender, System.EventArgs e)
{
Bitmap dst;
bool ret = Form1.Dup(this.pictureBox1.Image as Bitmap, out dst);
if (ret)
{
this.pictureBox1.Image = dst;
}
}

//get a new image from the original one
public static bool Dup(Bitmap src, out Bitmap dst)
{
dst = new Bitmap(src.Width, src.Height, src.PixelFormat);
dst.Palette = src.Palette; //it will be black, but never mind, just take the space

return true;
}

After press the button several time, i can see a lot of memory is taken by this process. and it seems not to release it at all. But in my code, only one copy is reference by pictureBox1.Image.

anybody know how to solve it?
Thanks!!
AnswerRe: Release memory quickly? Pin
leppie27-Jul-03 3:14
leppie27-Jul-03 3:14 
GeneralAlgorithm needed Pin
albean26-Jul-03 15:02
albean26-Jul-03 15:02 
GeneralRe: Algorithm needed Pin
Anonymous26-Jul-03 17:00
Anonymous26-Jul-03 17:00 
GeneralRe: Algorithm needed Pin
Jim Stewart26-Jul-03 17:01
Jim Stewart26-Jul-03 17:01 
GeneralRe: Algorithm needed - Thanks! Pin
albean26-Jul-03 17:28
albean26-Jul-03 17:28 

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.