Click here to Skip to main content
15,897,187 members
Home / Discussions / C#
   

C#

 
GeneralRe: Loading an Icon Resource Pin
Scott Dorman20-Apr-08 4:50
professionalScott Dorman20-Apr-08 4:50 
GeneralRe: Loading an Icon Resource Pin
#realJSOP20-Apr-08 5:07
professional#realJSOP20-Apr-08 5:07 
GeneralRe: Loading an Icon Resource Pin
Scott Dorman20-Apr-08 5:14
professionalScott Dorman20-Apr-08 5:14 
GeneralRe: Loading an Icon Resource Pin
#realJSOP20-Apr-08 5:41
professional#realJSOP20-Apr-08 5:41 
GeneralRe: Loading an Icon Resource Pin
Scott Dorman20-Apr-08 6:44
professionalScott Dorman20-Apr-08 6:44 
QuestionSorting data using BindingSource.Sort Pin
Alessandra7720-Apr-08 4:04
Alessandra7720-Apr-08 4:04 
QuestionOutofMemoryException Pin
Ian Grech20-Apr-08 2:57
Ian Grech20-Apr-08 2:57 
GeneralRe: OutofMemoryException Pin
Luc Pattyn20-Apr-08 3:10
sitebuilderLuc Pattyn20-Apr-08 3:10 
Hi,

I suspect the (generic) collections of storing objects all the time, even when the intended
type is a value type. Now each object has an administrative cost of at least 32 bytes,
so 24 million integers in a collection would amount to at least 1 gigabyte of memory
or address space.

So you might get a bit further by adding memory or enabling the 3GB switch, but the
gain would be limited anyhow.

If you need that many numbers, I suggest you don't store them (how long does it take
to fill the collection?); instead use an enumerator and possibly the yield keyword to
implement it. That way nothing gets stored, the numbers will be generated one at a time,
"just in time".

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.


GeneralRe: OutofMemoryException Pin
Jordanwb20-Apr-08 4:09
Jordanwb20-Apr-08 4:09 
GeneralRe: OutofMemoryException Pin
Luc Pattyn20-Apr-08 13:08
sitebuilderLuc Pattyn20-Apr-08 13:08 
GeneralRe: OutofMemoryException Pin
Jordanwb20-Apr-08 13:24
Jordanwb20-Apr-08 13:24 
GeneralRe: OutofMemoryException Pin
Luc Pattyn20-Apr-08 14:07
sitebuilderLuc Pattyn20-Apr-08 14:07 
GeneralRe: OutofMemoryException Pin
Jordanwb20-Apr-08 15:46
Jordanwb20-Apr-08 15:46 
GeneralRe: OutofMemoryException Pin
Ian Grech20-Apr-08 23:40
Ian Grech20-Apr-08 23:40 
GeneralRe: OutofMemoryException Pin
Ian Grech22-Apr-08 22:14
Ian Grech22-Apr-08 22:14 
AnswerRe: OutofMemoryException Pin
Ian Grech28-Apr-08 10:52
Ian Grech28-Apr-08 10:52 
GeneralRe: OutofMemoryException Pin
Scott Dorman20-Apr-08 4:42
professionalScott Dorman20-Apr-08 4:42 
GeneralRe: OutofMemoryException Pin
Ian Grech20-Apr-08 23:24
Ian Grech20-Apr-08 23:24 
GeneralRe: OutofMemoryException Pin
Jordanwb21-Apr-08 2:39
Jordanwb21-Apr-08 2:39 
GeneralRe: OutofMemoryException Pin
Scott Dorman22-Apr-08 16:58
professionalScott Dorman22-Apr-08 16:58 
GeneralSystem.CodeDom Problem. Pin
hdv21219-Apr-08 22:55
hdv21219-Apr-08 22:55 
GeneralRe: System.CodeDom Problem. Pin
Rob Smiley20-Apr-08 0:46
Rob Smiley20-Apr-08 0:46 
GeneralUnable to fill certain fields inside the DOM of some websites! Pin
alon198019-Apr-08 21:50
alon198019-Apr-08 21:50 
GeneralRe: Unable to fill certain fields inside the DOM of some websites! Pin
alon198021-Apr-08 4:36
alon198021-Apr-08 4:36 
GeneralFinalizer implementation Pin
George_George19-Apr-08 21:20
George_George19-Apr-08 21:20 

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.