|
From: Daniel G. <sp...@ho...> - 2001-10-22 17:55:42
|
<html><div style='background-color:'><P>An object holds it's own data members but does not have it's own copy of member functions - there is one instance of a member function that is used by all (since it does not change, while data members do).</P> <P> </P> <DIV>> > -----Original Message----- </DIV> <DIV></DIV>> > From: dev...@li... <DIV></DIV>> > [mailto:dev...@li...] On Behalf <DIV></DIV>> > Of Jason Hardman <DIV></DIV>> > Sent: Monday, October 22, 2001 12:10 AM <DIV></DIV>> > To: Dev-C++ <DIV></DIV>> > Subject: Re: [Dev-C++] Strange effect <DIV></DIV>> > <DIV></DIV>> > <DIV></DIV>> > Is this just your belief or can you prove that this is the <DIV></DIV>> > case from some external referece or knowledgable party (other <DIV></DIV>> > than yourself)? <DIV></DIV>> > <DIV></DIV>> > As I have been given to understand it the case of there only <DIV></DIV>> > being one set of methods existing in memory for a class, and <DIV></DIV>> > then each method being passed a hidden pointer to the object <DIV></DIV>> > is the true case. Hence the existence of the "this" pointer <DIV></DIV>> > for use in a class. I would also like to mention that the way <DIV></DIV>> > you would have it is unecessarily wasteful of resources. The <DIV></DIV>> > issue becomes more complex with virtual methods and such, but <DIV></DIV>> > I won't go into that right now. <DIV></DIV>> > <DIV></DIV>> > I wouldn't mind if someone else who is reading this <DIV></DIV>> > discussion, and is knowledgable about the subject, putting us <DIV></DIV>> > both on the correct path. <DIV></DIV>> > <DIV></DIV>> > Jason. <DIV></DIV>> > <DIV></DIV>> > ----- Original Message ----- <DIV></DIV>> > From: "Ioannis Vranos" <NO...@YA...> <DIV></DIV>> > To: "Dev-C++" <DEV...@LI...> <DIV></DIV>> > Sent: Sunday, October 21, 2001 3:14 PM <DIV></DIV>> > Subject: RE: [Dev-C++] Strange effect <DIV></DIV>> > <DIV></DIV>> > <DIV></DIV>> > Yes, when we create an object all member functions are being <DIV></DIV>> > (re)created for that particual object. <DIV></DIV>> > <DIV></DIV>> > <DIV></DIV>> > <DIV></DIV>> > >do you believe that there are only a single set of methods for every <DIV></DIV>> > object of a type, and the objects only contain the data? <DIV></DIV>> > <DIV></DIV>> > <DIV></DIV>> > No. <DIV></DIV>> > <DIV></DIV>> > <DIV></DIV>> > <DIV></DIV>> > _______________________________________________ <DIV></DIV>> > Dev-cpp-users mailing list <DIV></DIV>> > Dev...@li... <DIV></DIV>> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users <DIV></DIV>> > <DIV></DIV>> <DIV></DIV>> <DIV></DIV>>_______________________________________________ <DIV></DIV>>Dev-cpp-users mailing list <DIV></DIV>>Dev...@li... <DIV></DIV>>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users <DIV></DIV></div><br clear=all><hr>Get your FREE download of MSN Explorer at <a href='http://go.msn.com/bql/hmtag_itl_EN.asp'>http://explorer.msn.com</a><br></html> |