Article ID: 133068 - Last Review: July 5, 2005 - Revision: 1.1 BUG: Deleting a Struct Typedef Causes C1059, C1063, or C1001This article was previously published under Q133068 On This PageSYMPTOMS
The sample code fragment listed at the end of this article incorrectly
deletes a typedef of a pointer to a structure, which generates the
following compiler errors:
RESOLUTION
The above error messages are misleading and do not point out the real
problem, which is that you cannot delete a typedef. Additionally, the
operand of delete must be a pointer returned by the new operator. Using
delete on a pointer to an object not allocated with new gives unpredictable
results.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
MORE INFORMATIONSample Code to Reproduce ProblemAPPLIES TO
| Article Translations
|

Back to the top
