Every object carries around a vtable pointer (because System.Object has virtual functions) and a sync block index. So yes, instantiating even an object with no data will consume memory.
-- Ivan Towlson White Carbon -----Original Message----- From: Moderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] Behalf Of Craig Boland Sent: 16 June 2003 19:44 To: [EMAIL PROTECTED] Subject: [ADVANCED-DOTNET] Object Memory Space Does anyone know what factors affect the memory size an object will consume by simply creating a new instance? I know that member-level value- types will consume memory respective of their data type (Int32 consumes 4 bytes, etc.). What about code? Does a class that contains no member variables, but 2000 lines of code consume any memory by simply instantiating a new one?