Click here to Skip to main content
15,925,723 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralWindow from resource Pin
Erik31-Aug-00 4:50
Erik31-Aug-00 4:50 
GeneralRe: Window from resource Pin
Erik Funkenbusch31-Aug-00 12:17
Erik Funkenbusch31-Aug-00 12:17 
GeneralTab key is not working in OCX control -- URGENT Pin
Abdul Kareem31-Aug-00 4:49
Abdul Kareem31-Aug-00 4:49 
GeneralRe: Tab key is not working in OCX control -- URGENT Pin
Igor Chouvalov31-Aug-00 6:07
Igor Chouvalov31-Aug-00 6:07 
GeneralRe: Tab key is not working in OCX control -- URGENT Pin
Abdul Kareem31-Aug-00 7:27
Abdul Kareem31-Aug-00 7:27 
GeneralICommandWithParameters implementation code Pin
hongdongsuk31-Aug-00 0:58
hongdongsuk31-Aug-00 0:58 
Generaloverriding new/delete Pin
Walter Gildersleeve30-Aug-00 21:24
Walter Gildersleeve30-Aug-00 21:24 
GeneralRe: overriding new/delete Pin
Tim Deveaux31-Aug-00 14:00
Tim Deveaux31-Aug-00 14:00 
In a his discussion of the placement new operations Stroustrup ($10.4.11) describes a deletion mechanism using a Destroy fn which:

1. Calls the destructor of the object explicitly.

2. Frees the memory associated with it (in this case calling free(), since the operator new called alloc).

delete is not used.

On another tack, note also that the array version of delete cannot be overridden by one at class scope:

From "The operator delete Function" (MSDN):
"There are global and class-scoped operator delete functions. Only one operator delete function can be defined for a given class; if defined, it hides the global operator delete function. The global operator delete function is always called for arrays of any type"

You can, I think, overload a global operator delete[] if arrays are the problem, but this is not somewhere I have visited.

The _crtBreakAlloc mechanism is a great way to track leaks, but it's ease of use is lessened if your allocations are not predictable.

Sounds like a fun class - might be interesting to see more of the layout.

Refs:
[Stroustrup] The C++ Programming Language, 3rd Edition, 1977, Addison Wesley


GeneralRe: overriding new/delete Pin
Tim Deveaux3-Sep-00 3:49
Tim Deveaux3-Sep-00 3:49 
GeneralVB / VC++ question Pin
Danny30-Aug-00 21:17
Danny30-Aug-00 21:17 
GeneralRe: VB / VC++ question Pin
HP31-Aug-00 1:07
HP31-Aug-00 1:07 
GeneralRe: VB / VC++ question Pin
jschacker1-Sep-00 10:45
jschacker1-Sep-00 10:45 
GeneralGet Binary TimeZone Info from Registry Pin
Lynda Brenock30-Aug-00 19:39
sussLynda Brenock30-Aug-00 19:39 
GeneralRe: Get Binary TimeZone Info from Registry Pin
HP31-Aug-00 1:00
HP31-Aug-00 1:00 
GeneralRe: Get Binary TimeZone Info from Registry Pin
lynda31-Aug-00 12:04
lynda31-Aug-00 12:04 
GeneralHyperlink Pin
Eq30-Aug-00 18:04
Eq30-Aug-00 18:04 
GeneralRe: Hyperlink Pin
Oleg Zhuk30-Aug-00 22:53
Oleg Zhuk30-Aug-00 22:53 
Generalannoying button border Pin
philippe dykmans29-Aug-00 0:16
philippe dykmans29-Aug-00 0:16 
GeneralRe: annoying button border Pin
philippe dykmans30-Aug-00 23:53
philippe dykmans30-Aug-00 23:53 
Generaltree controls in unicode... Pin
lauren28-Aug-00 21:03
lauren28-Aug-00 21:03 
GeneralCursor pointer color Pin
sunny28-Aug-00 15:54
sunny28-Aug-00 15:54 
GeneralRe: Cursor pointer color Pin
Ezz Khayyat29-Aug-00 3:46
professionalEzz Khayyat29-Aug-00 3:46 
General*** Retriving Rows of Data from Access Tables ** Pin
Steve Lai28-Aug-00 15:40
Steve Lai28-Aug-00 15:40 
GeneralRe: *** Retriving Rows of Data from Access Tables ** Pin
lauren28-Aug-00 21:07
lauren28-Aug-00 21:07 
GeneralRe: *** Retriving Rows of Data from Access Tables ** Pin
Steve Lai29-Aug-00 10:39
Steve Lai29-Aug-00 10:39 

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.