[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DotGNU]Bug - null objects and stack traces.
From: |
Gopal V |
Subject: |
Re: [DotGNU]Bug - null objects and stack traces. |
Date: |
Sun, 6 Oct 2002 10:54:41 +0530 |
User-agent: |
Mutt/1.2.5i |
If memory serves me right, Rhys Weatherley wrote:
> It is perfectly legitimate to call a method with a null "this"
> object in CLI. Object references are checked at the point they
> are first dereferenced. Dereferences occur when you access a
> field or make a virtual method call (which needs to access the
> vtable in the object). Because "Push" is not virtual, the first
> time that "s" is dereferenced is within the method body. MS'es
> CLR does the same thing.
"call" instruction does not throw a NullReferenceException , but
"callvirt" does ... But "why ?" is not something I can answer.
Gopal
--
The difference between insanity and genius is measured by success