|
-
Aug 29th, 2005, 05:55 AM
#1
Size of a referenc in C#?
Say that I do something like this on a Win XP 32bit machine in Visual Studio 03/05:
Code:
MyClass object1 = new MyClass();
MyClass object2 = object1;
how much memory does object2 use? 32bit? Or does it hold RTTI info and more too?
Thanks
- ØØ -
-
Aug 29th, 2005, 06:17 AM
#2
Re: Size of a referenc in C#?
I am not sure if I belive in it, but this is what I have found so far:
http://www.developerfusion.co.uk/show/4705/
(On the 32-bit version of .NET, for instance, a reference type variable's slot is always just 4 bytes.)
- ØØ -
Last edited by NoteMe; Aug 29th, 2005 at 07:21 AM.
-
Aug 29th, 2005, 06:34 AM
#3
Frenzied Member
Re: Size of a referenc in C#?
as the reference is a pointer to the address of the object.. it should be 32-bit for 32-bit platforms.
-
Aug 29th, 2005, 07:21 AM
#4
Re: Size of a referenc in C#?
So what makes it type safe? Isn't there any RTTI info stored? How does it know it is of type MyClass, and not an other type of pointer?
- ØØ -
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|