Opened 11 years ago

Closed 10 years ago

#5940 closed Support Requests (fixed)

Workaround for VC bug

Reported by: Antony Polukhin Owned by: Fernando Cacciola
Milestone: To Be Determined Component: optional
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc: antoshkka@…

Description

Visual C++: missing of destructor call of virtual base class when derived class is destructed by explicit qualified destructor call. bug description

Attachments (1)

optional.hpp-HEADcS7649.diff (389 bytes ) - added by Antony Polukhin 11 years ago.

Download all attachments as: .zip

Change History (4)

by Antony Polukhin, 11 years ago

comment:1 by Antony Polukhin, 11 years ago

Added patch, that replaces get_ptr_impl()->T::~T() with get_ptr_impl()->~T() for VC.

That patch removes the memory leak.

comment:2 by Steven Watanabe, 10 years ago

I don't see any reason to make this conditional on VC. I'm not aware of any problems with plain get_ptr_impl()->~T().

comment:3 by Steven Watanabe, 10 years ago

Resolution: fixed
Status: newclosed

(In [82915]) Work around msvc bug when explicitly destroying a class with a virtual base. Fixes #5940.

Note: See TracTickets for help on using tickets.