Click here to Skip to main content
16,015,594 members
Home / Discussions / C#
   

C#

 
GeneralRe: Optimization Pin
Paul Conrad27-Jan-08 5:48
professionalPaul Conrad27-Jan-08 5:48 
GeneralRe: Optimization Pin
half-life27-Jan-08 7:09
half-life27-Jan-08 7:09 
GeneralRe: Optimization Pin
Paul Conrad27-Jan-08 7:16
professionalPaul Conrad27-Jan-08 7:16 
GeneralRe: Optimization Pin
half-life27-Jan-08 8:31
half-life27-Jan-08 8:31 
GeneralRe: Optimization Pin
Paul Conrad27-Jan-08 9:10
professionalPaul Conrad27-Jan-08 9:10 
GeneralRe: Optimization Pin
half-life27-Jan-08 9:51
half-life27-Jan-08 9:51 
GeneralRe: Optimization Pin
Paul Conrad27-Jan-08 9:56
professionalPaul Conrad27-Jan-08 9:56 
GeneralRe: Optimization Pin
Luc Pattyn27-Jan-08 6:35
sitebuilderLuc Pattyn27-Jan-08 6:35 
Hi,

I don't have specific articles in mind.

Is there a specific problem? Most problems get solved by common sense.
Memory related problems need an answer to these questions:
1. are my objects larger than necessary?
2. am I using more objects than necessary?
3. am I keeping them alive longer than necessary?
4. when I don't need an object any longer, and it offers either a Close() or a Dispose() method,
do I call it explicitly? This applies to simple objects such as Pen and Font, as well as
extremely complex things such as Graphics. If you do "new Font" in a Paint handler, you
should Dispose of the Font (or better yet hold it in a class member for future use, so don't
create new ones all the time)
5. if my class is allocating unmanaged resources (say through native code), do I provide
a Dispose() method?

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: Optimization Pin
half-life27-Jan-08 7:07
half-life27-Jan-08 7:07 
GeneralRe: Optimization Pin
Luc Pattyn27-Jan-08 7:34
sitebuilderLuc Pattyn27-Jan-08 7:34 
GeneralRe: Optimization Pin
half-life27-Jan-08 8:38
half-life27-Jan-08 8:38 
GeneralRe: Optimization Pin
Luc Pattyn27-Jan-08 8:53
sitebuilderLuc Pattyn27-Jan-08 8:53 
GeneralRe: Optimization Pin
half-life27-Jan-08 9:53
half-life27-Jan-08 9:53 
GeneralRe: Optimization Pin
PIEBALDconsult27-Jan-08 7:39
mvePIEBALDconsult27-Jan-08 7:39 
GeneralRe: Optimization Pin
half-life27-Jan-08 8:41
half-life27-Jan-08 8:41 
GeneralRe: Optimization Pin
Luc Pattyn27-Jan-08 9:21
sitebuilderLuc Pattyn27-Jan-08 9:21 
GeneralRe: Optimization Pin
half-life27-Jan-08 9:54
half-life27-Jan-08 9:54 
GeneralRe: Optimization Pin
PIEBALDconsult27-Jan-08 10:47
mvePIEBALDconsult27-Jan-08 10:47 
QuestionShare source code of C# Pin
kelary27-Jan-08 2:51
kelary27-Jan-08 2:51 
GeneralRe: Share source code of C# Pin
Giorgi Dalakishvili27-Jan-08 3:00
mentorGiorgi Dalakishvili27-Jan-08 3:00 
GeneralRe: Share source code of C# Pin
Paul Conrad27-Jan-08 5:50
professionalPaul Conrad27-Jan-08 5:50 
QuestionHow to Represent String Constants Pin
Brady Kelly27-Jan-08 0:11
Brady Kelly27-Jan-08 0:11 
AnswerRe: How to Represent String Constants Pin
PIEBALDconsult27-Jan-08 4:15
mvePIEBALDconsult27-Jan-08 4:15 
GeneralRe: How to Represent String Constants Pin
Brady Kelly27-Jan-08 4:49
Brady Kelly27-Jan-08 4:49 
GeneralRe: How to Represent String Constants Pin
PIEBALDconsult27-Jan-08 7:49
mvePIEBALDconsult27-Jan-08 7:49 

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.