FIX: The "this" Pointer Is Incorrect in Destructor of Base Class (168385)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
- Microsoft Visual C++ .NET (2002)
This article was previously published under Q168385 SYMPTOMS The "this" pointer is incorrectly set up in the destructor
of a base class. This problem occurs when the array delete is called and there
is a class that inherits from two base classes that have virtual functions and
the second base class has a virtual destructor. RESOLUTION One workaround is to make the base classes virtual base
classes. Another option is to use something other than array new and array
delete to allocate and deallocate the memory. For example, declare the array
statically. STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are
listed at the beginning of this article.
This bug was corrected in Microsoft Visual C++ .NET (2003).
Modification Type: | Major | Last Reviewed: | 9/23/2003 |
---|
Keywords: | kbfix kbBug kbCompiler KB168385 |
---|
|