Click here to Skip to main content
15,887,746 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: Annoying Properties Pin
albean26-Jul-03 14:57
albean26-Jul-03 14:57 
GeneralRe: Annoying Properties Pin
albean26-Jul-03 15:16
albean26-Jul-03 15:16 
GeneralRe: Annoying Properties Pin
StealthyMark27-Jul-03 23:44
StealthyMark27-Jul-03 23:44 
GeneralSend Error Message From Web Service To its client Pin
Mazdak26-Jul-03 9:30
Mazdak26-Jul-03 9:30 
GeneralRe: Send Error Message From Web Service To its client Pin
SimonS26-Jul-03 23:21
SimonS26-Jul-03 23:21 
GeneralRe: Send Error Message From Web Service To its client Pin
Mazdak27-Jul-03 4:38
Mazdak27-Jul-03 4:38 
GeneralRe: Send Error Message From Web Service To its client Pin
SimonS27-Jul-03 6:24
SimonS27-Jul-03 6:24 
GeneralRe: Send Error Message From Web Service To its client Pin
Mazdak27-Jul-03 9:58
Mazdak27-Jul-03 9:58 
QuestionHow to set a datasource for a usercontrol? Pin
STW26-Jul-03 9:21
STW26-Jul-03 9:21 
AnswerRe: How to set a datasource for a usercontrol? Pin
StealthyMark27-Jul-03 23:58
StealthyMark27-Jul-03 23:58 
QuestionNew to graphics drawing.....any assistance? Pin
LongRange.Shooter26-Jul-03 3:26
LongRange.Shooter26-Jul-03 3:26 
AnswerRe: New to graphics drawing.....any assistance? Pin
leppie26-Jul-03 7:42
leppie26-Jul-03 7:42 

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.