Click here to Skip to main content
16,016,537 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Memory Leaks Pin
Tim Smith22-May-02 8:58
Tim Smith22-May-02 8:58 
GeneralRe: Memory Leaks Pin
Alex Cramer22-May-02 20:53
Alex Cramer22-May-02 20:53 
GeneralCListBox avoid (scrollbar-)repaint while updating items Pin
22-May-02 3:47
suss22-May-02 3:47 
GeneralRe: CListBox avoid (scrollbar-)repaint while updating items Pin
Chris Losinger22-May-02 3:56
professionalChris Losinger22-May-02 3:56 
GeneralRe: CListBox avoid (scrollbar-)repaint while updating items Pin
Tim Smith22-May-02 4:56
Tim Smith22-May-02 4:56 
GeneralRe: CListBox avoid (scrollbar-)repaint while updating items Pin
22-May-02 8:25
suss22-May-02 8:25 
QuestionStructs: on heap or stack? Pin
Anton A. Loukine22-May-02 3:48
Anton A. Loukine22-May-02 3:48 
AnswerRe: Structs: on heap or stack? Pin
Joaquín M López Muñoz22-May-02 4:23
Joaquín M López Muñoz22-May-02 4:23 
Unless you've got a strong reason not to do it, you'll be much better off declaring your member variables as straight CStrings (i.e. not pointers). Maintaining the integrity of your program when it comes to copying objects can be a real nightmare if you use pointers throughout. Besides, the overhead incurred by copying CString is negligible in most cases (and certainly it is if you don't expect to have more than 100 objects around.)

As for whether to store objects in the heap or in the stack, my advice is: declare everything in the stack unless you cannot (the reasons why you cannot should be obvious when you come to them.)

Another advice. Use extensively BBG_SECURITIES& (or even better const BBG_SECURITIES&) as the parms of your functions whenever it is doable.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: Structs: on heap or stack? Pin
Anton A. Loukine22-May-02 6:31
Anton A. Loukine22-May-02 6:31 
GeneralRe: Structs: on heap or stack? Pin
Joaquín M López Muñoz22-May-02 6:44
Joaquín M López Muñoz22-May-02 6:44 
GeneralOwner draw help please. Pin
cycosi22-May-02 3:39
cycosi22-May-02 3:39 
GeneralRe: Owner draw help please. Pin
Roger Allen22-May-02 6:26
Roger Allen22-May-02 6:26 
GeneralRe: Owner draw help please. Pin
cycosi22-May-02 20:48
cycosi22-May-02 20:48 
GeneralRe: Owner draw help please. Pin
cycosi22-May-02 23:08
cycosi22-May-02 23:08 
GeneralMemory: debug vs. real world (3) Pin
Mike Osbahr22-May-02 3:24
Mike Osbahr22-May-02 3:24 
GeneralRe: Memory: debug vs. real world (3) Pin
Tim Smith22-May-02 5:00
Tim Smith22-May-02 5:00 
GeneralRe: Memory: debug vs. real world (3) Pin
Mike Osbahr22-May-02 5:54
Mike Osbahr22-May-02 5:54 
GeneralRe: Memory: debug vs. real world (3) Pin
Tim Smith22-May-02 7:39
Tim Smith22-May-02 7:39 
GeneralRe: Memory: debug vs. real world (3) Pin
Mike Osbahr22-May-02 9:39
Mike Osbahr22-May-02 9:39 
GeneralRe: Memory: debug vs. real world (3) Pin
Mike Nordell23-May-02 3:48
Mike Nordell23-May-02 3:48 
GeneralCDialog Pin
Zizilamoroso22-May-02 3:06
Zizilamoroso22-May-02 3:06 
GeneralRe: CDialog Pin
Martin Ziacek22-May-02 3:29
Martin Ziacek22-May-02 3:29 
GeneralRe: CDialog Pin
Zizilamoroso22-May-02 3:28
Zizilamoroso22-May-02 3:28 
GeneralRe: CDialog Pin
Zizilamoroso22-May-02 3:29
Zizilamoroso22-May-02 3:29 
GeneralRe: CDialog Pin
Martin Ziacek22-May-02 3:47
Martin Ziacek22-May-02 3:47 

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.