Click here to Skip to main content
15,898,745 members
Home / Discussions / C#
   

C#

 
GeneralRe: reading and replacing the ini files using c# Pin
Luc Pattyn23-Jul-10 2:38
sitebuilderLuc Pattyn23-Jul-10 2:38 
AnswerRe: reading and replacing the ini files using c# Pin
PIEBALDconsult23-Jul-10 5:16
mvePIEBALDconsult23-Jul-10 5:16 
QuestionTriggering an event from another class? Pin
faheemnadeem23-Jul-10 0:54
faheemnadeem23-Jul-10 0:54 
AnswerRe: Triggering an event from another class? Pin
Samuel Cherinet23-Jul-10 3:23
Samuel Cherinet23-Jul-10 3:23 
AnswerRe: Triggering an event from another class? Pin
DaveyM6923-Jul-10 6:09
professionalDaveyM6923-Jul-10 6:09 
AnswerRe: Triggering an event from another class? Pin
faheemnadeem23-Jul-10 6:21
faheemnadeem23-Jul-10 6:21 
QuestionnHibernate Commit throws OutOfMemoryException Pin
spit_spit_spit_spit22-Jul-10 23:40
spit_spit_spit_spit22-Jul-10 23:40 
AnswerRe: nHibernate Commit throws OutOfMemoryException Pin
Luc Pattyn23-Jul-10 2:50
sitebuilderLuc Pattyn23-Jul-10 2:50 
Hi,

I see two possibilities: a real out-of-memory condition (just keeping too many objects alive at the same time), or a fragmentation problem (the memory for each individual object needs to be contiguous, big arrays/collections may fail their allocation).

Here is how to tell them apart:
- display or log the result of Environment.WorkingSet regularly; it shows how much memory is needed by your app. (You could divide by 1024*1024 to get megabytes rather than bytes).
- if it continues to increase, up to one or a few gigabytes, you're really running out of memory, and you must look for memory leaks (not disposing of things you should?) or too many objects that never die (e.g. a poorly implemented caching scheme trying to remember everything that ever lived).
- if the WorkingSet is well below 1 gigabyte when your app crashes, you have a fragmentation problem. They were common on older .NET versions when using collections that grow all the time. There is no 100% solution, you should try removing items you no longer need (or clear the collection ASAP), and allocate a sufficient capacity when starting a collection (see http://www.perceler.com/articles1.php?art=capacity1[^] for some background info).

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


QuestionHow can i convert all types of files to pdf format without using any software? Pin
sush822-Jul-10 22:54
sush822-Jul-10 22:54 
JokeRe: How can i convert all types of files to pdf format without using any software? Pin
Łukasz Nowakowski22-Jul-10 23:05
Łukasz Nowakowski22-Jul-10 23:05 
GeneralRe: How can i convert all types of files to pdf format without using any software? Pin
sush822-Jul-10 23:26
sush822-Jul-10 23:26 
GeneralRe: How can i convert all types of files to pdf format without using any software? Pin
Łukasz Nowakowski22-Jul-10 23:31
Łukasz Nowakowski22-Jul-10 23:31 
GeneralRe: How can i convert all types of files to pdf format without using any software? Pin
Sauro Viti22-Jul-10 23:32
professionalSauro Viti22-Jul-10 23:32 
GeneralRe: How can i convert all types of files to pdf format without using any software? Pin
Eddy Vluggen22-Jul-10 23:39
professionalEddy Vluggen22-Jul-10 23:39 
GeneralRe: How can i convert all types of files to pdf format without using any software? Pin
sush822-Jul-10 23:50
sush822-Jul-10 23:50 
GeneralRe: How can i convert all types of files to pdf format without using any software? Pin
Dave Kreskowiak23-Jul-10 1:48
mveDave Kreskowiak23-Jul-10 1:48 
GeneralRe: How can i convert all types of files to pdf format without using any software? Pin
Eddy Vluggen23-Jul-10 2:04
professionalEddy Vluggen23-Jul-10 2:04 
GeneralRe: How can i convert all types of files to pdf format without using any software? Pin
sush823-Jul-10 7:12
sush823-Jul-10 7:12 
GeneralRe: How can i convert all types of files to pdf format without using any software? Pin
Eddy Vluggen23-Jul-10 7:41
professionalEddy Vluggen23-Jul-10 7:41 
GeneralRe: How can i convert all types of files to pdf format without using any software? Pin
sush824-Jul-10 1:21
sush824-Jul-10 1:21 
GeneralRe: How can i convert all types of files to pdf format without using any software? Pin
Eddy Vluggen24-Jul-10 1:43
professionalEddy Vluggen24-Jul-10 1:43 
GeneralRe: How can i convert all types of files to pdf format without using any software? Pin
sush824-Jul-10 3:53
sush824-Jul-10 3:53 
AnswerRe: How can i convert all types of files to pdf format without using any software? Pin
Sauro Viti22-Jul-10 23:09
professionalSauro Viti22-Jul-10 23:09 
Questioncode for checkbox Pin
kolisa22-Jul-10 21:58
kolisa22-Jul-10 21:58 
AnswerRe: code for checkbox Pin
Goutam Patra22-Jul-10 22:25
professionalGoutam Patra22-Jul-10 22:25 

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.