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

C / C++ / MFC

 
GeneralHelp needed! Pin
Member 25547123-Feb-05 1:44
Member 25547123-Feb-05 1:44 
GeneralRe: Help needed! Pin
David Crow23-Feb-05 2:31
David Crow23-Feb-05 2:31 
GeneralRe: Help needed! Pin
Steen Krogsgaard23-Feb-05 2:42
Steen Krogsgaard23-Feb-05 2:42 
GeneralRe: Help needed! Pin
Steen Krogsgaard23-Feb-05 2:32
Steen Krogsgaard23-Feb-05 2:32 
GeneralRe: Help needed! Pin
Ryan Binns23-Feb-05 17:11
Ryan Binns23-Feb-05 17:11 
GeneralRe: Help needed! Pin
Steen Krogsgaard23-Feb-05 21:46
Steen Krogsgaard23-Feb-05 21:46 
GeneralRe: Help needed! Pin
Ryan Binns24-Feb-05 12:38
Ryan Binns24-Feb-05 12:38 
GeneralRe: Help needed! Pin
Steen Krogsgaard24-Feb-05 22:18
Steen Krogsgaard24-Feb-05 22:18 
Allright.

Are you absolutely sure that other compilers make a copy of the vtable for each instantiated object? It seems such a waste of resources. Imagine having a class with 25 virutal methods, thats 100 bytes for each vtable, and having objects of this class in a large array, say 10000 objects, thats 1MB just for vtables - and identical vtables, I might add. From what I've been able to dig out with Google, GCC also uses pointers to vtables, and this reference http://www.awprofessional.com/articles/article.asp?p=26063&seqNum=3[^] states that not only all C++ compilers, but all compilers for all languages using virtual functions are implemented with at pointer to the vtable in the object. Do you have any references for compilers that use the one-vtable-per-object model? I'm just curious!



Cheers
Steen.

"To claim that computer games influence children is ridiculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
GeneralRe: Help needed! Pin
Ryan Binns25-Feb-05 1:06
Ryan Binns25-Feb-05 1:06 
GeneralHandling messages in another class Pin
tttyip23-Feb-05 0:25
tttyip23-Feb-05 0:25 
GeneralRe: Handling messages in another class Pin
RChin23-Feb-05 0:51
RChin23-Feb-05 0:51 
Generalmerge some cells from the same row in CListCtrl Pin
catalin buj23-Feb-05 0:14
catalin buj23-Feb-05 0:14 
GeneralRe: merge some cells from the same row in CListCtrl Pin
bitpusher23-Feb-05 9:56
bitpusher23-Feb-05 9:56 
GeneralRe: merge some cells from the same row in CListCtrl Pin
catalin buj23-Feb-05 22:19
catalin buj23-Feb-05 22:19 
GeneralProblem with metafile-playback in print preview Pin
Christian Waluga22-Feb-05 23:35
Christian Waluga22-Feb-05 23:35 
GeneralRe: Problem with metafile-playback in print preview Pin
Christian Waluga23-Feb-05 22:15
Christian Waluga23-Feb-05 22:15 
GeneralUse C++ written class in VB Pin
Logan from Singapore22-Feb-05 23:33
Logan from Singapore22-Feb-05 23:33 
GeneralRe: Use C++ written class in VB Pin
ThatsAlok22-Feb-05 23:52
ThatsAlok22-Feb-05 23:52 
Generalappend CString [] Pin
kittunair22-Feb-05 23:28
kittunair22-Feb-05 23:28 
GeneralRe: append CString [] Pin
ThatsAlok22-Feb-05 23:50
ThatsAlok22-Feb-05 23:50 
GeneralRe: append CString [] Pin
David Nash23-Feb-05 7:03
David Nash23-Feb-05 7:03 
GeneralDate Validation Pin
Renjith Ramachandran22-Feb-05 23:16
Renjith Ramachandran22-Feb-05 23:16 
GeneralRe: Date Validation Pin
David Crow23-Feb-05 2:40
David Crow23-Feb-05 2:40 
GeneralRe: Date Validation Pin
James R. Twine23-Feb-05 2:51
James R. Twine23-Feb-05 2:51 
GeneralRe: Date Validation Pin
anand_study17-May-05 19:47
anand_study17-May-05 19: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.