Click here to Skip to main content
16,014,613 members
Home / Discussions / C#
   

C#

 
GeneralColor Creation Pin
MarkMokris27-Jul-05 8:54
MarkMokris27-Jul-05 8:54 
GeneralRe: Color Creation Pin
Peter Vertes27-Jul-05 9:11
Peter Vertes27-Jul-05 9:11 
GeneralRe: Color Creation Pin
Libor Tinka27-Jul-05 9:15
Libor Tinka27-Jul-05 9:15 
GeneralScrolling with bitmap Pin
Yigal Agam27-Jul-05 8:45
Yigal Agam27-Jul-05 8:45 
GeneralRe: Scrolling with bitmap Pin
Libor Tinka27-Jul-05 9:19
Libor Tinka27-Jul-05 9:19 
GeneralRe: Scrolling with bitmap Pin
Yigal Agam27-Jul-05 9:28
Yigal Agam27-Jul-05 9:28 
GeneralRe: Scrolling with bitmap Pin
Libor Tinka27-Jul-05 9:53
Libor Tinka27-Jul-05 9:53 
QuestionGiant memory leaks or what? Pin
Libor Tinka27-Jul-05 8:37
Libor Tinka27-Jul-05 8:37 
I've created some control that browses directories using TreeView on the left side and shows image thumbnails on the right side.

This control contains thumbnail management. It works this way:

Create hash string from image file address: C:\hello.png -> e8f838d8283kn4.jpg
Does e8f838d8283kn4.jpg exist?
Yes: load this file
No: 1) shrink source image and save as e8f838d8283kn4.jpg
2) dispose source image

But when I browse gallery of 100 3.0 mpx images, my app creates about half of them and then system tells me, there is not enough virtual memory. Next message comes from mscorlib.dll (Out of memory exception) and program falls down.

But thumbnails are small enough. If there are 100 128x128 thumbs, it takes up to:
128x128x3x100 = +- 4.6 MB

Every 3 mpx source image is disposed (using Image.Dispose() call) as well as thumbnails, when directory changes. So why is there lack of memory OMG | :OMG: (my PC has about 240 MB RAM, this may not be a problem).

GC must clear all resources since system needs memory occupied by disposed images, doesn't?
AnswerRe: Giant memory leaks or what? Pin
Dave Kreskowiak27-Jul-05 8:41
mveDave Kreskowiak27-Jul-05 8:41 
GeneralRe: Giant memory leaks or what? Pin
Libor Tinka27-Jul-05 9:00
Libor Tinka27-Jul-05 9:00 
GeneralRe: Giant memory leaks or what? Pin
Libor Tinka27-Jul-05 9:04
Libor Tinka27-Jul-05 9:04 
AnswerRe: Giant memory leaks or what? Pin
Judah Gabriel Himango27-Jul-05 9:11
sponsorJudah Gabriel Himango27-Jul-05 9:11 
GeneralRe: Giant memory leaks or what? Pin
Libor Tinka27-Jul-05 9:40
Libor Tinka27-Jul-05 9:40 
GeneralRe: Giant memory leaks or what? Pin
Judah Gabriel Himango27-Jul-05 9:46
sponsorJudah Gabriel Himango27-Jul-05 9:46 
GeneralRe: Giant memory leaks or what? Pin
Libor Tinka27-Jul-05 9:56
Libor Tinka27-Jul-05 9:56 
AnswerRe: Giant memory leaks or what? Pin
Andy Brummer27-Jul-05 11:46
sitebuilderAndy Brummer27-Jul-05 11:46 
GeneralEnumerations Pin
MarkMokris27-Jul-05 8:17
MarkMokris27-Jul-05 8:17 
GeneralRe: Enumerations Pin
Libor Tinka27-Jul-05 8:23
Libor Tinka27-Jul-05 8:23 
GeneralRe: Enumerations Pin
Matt Gerrans27-Jul-05 8:24
Matt Gerrans27-Jul-05 8:24 
GeneralRe: Enumerations Pin
Matt Gerrans27-Jul-05 8:34
Matt Gerrans27-Jul-05 8:34 
GeneralRe: Enumerations Pin
MarkMokris27-Jul-05 8:29
MarkMokris27-Jul-05 8:29 
GeneralRe: Enumerations Pin
Libor Tinka27-Jul-05 8:40
Libor Tinka27-Jul-05 8:40 
GeneralStatic Panel and the IDE Pin
Peter Vertes27-Jul-05 8:10
Peter Vertes27-Jul-05 8:10 
GeneralRe: Static Panel and the IDE Pin
Libor Tinka27-Jul-05 8:53
Libor Tinka27-Jul-05 8:53 
Generaldisabling windows keys Pin
Sam 200627-Jul-05 7:38
Sam 200627-Jul-05 7:38 

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.