c++ bug: PXCBase::operator delete: destroyed object method call

c++ bug: PXCBase::operator delete: destroyed object method call

sps's picture

PCSDK\include\pxcbase.h(28): in 'PXCBase::operator delete(void*)'  pure virtual Release() method is called after object destruction.

7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
David Lu (Intel)'s picture

We will investigate and it will be fixed in future release. Thanks! David

Xintian Wu (Intel)'s picture

Could you submit a test case to reproduce this bug?

sps's picture

ISO/IEC IS 14882 Programming languages - C++

12.4 Destructors [class.dtor]

Claim 14

Once a destructor is invoked for an object, the object no longer exists; the behavior is undefined if the destructor is invoked for an object whose lifetime has ended (3.8).



Xintian Wu (Intel)'s picture

Are you trying to implement a PXCBase class derived interface, say PXCGesture?
If so, you should implement it as
class MyGestureImpl: public PXCBaseImpl {
};

You can see that the PXCBaseImpl implements the desctructor.
There should not be cases as you described.
That's why I am asking for a test case.

Xintian Wu (Intel)'s picture

Are you trying to implement a PXCBase class derived interface, say PXCGesture?
If so, you should implement it as
class MyGestureImpl: public PXCBaseImpl {
};

You can see that the PXCBaseImpl implements the desctructor.
There should not be cases as you described.
That's why I am asking for a test case.

Xintian Wu (Intel)'s picture

It should be class MyGestureImpl: public PXCBaseImpl %lt PXCGesture %gt {
}

Xintian Wu (Intel)'s picture

It should be class MyGestureImpl: public PXCBaseImpl %lt PXCGesture %gt {
}

Login to leave a comment.