Fix deleting FrameManagerImpl*

delete playerHandleInfo->frameManager wasn't actually calling
FrameManagerImpl~, because playerHandleInfo->frameManager is only a
FrameManager, which didn't have a destructor, and nothing was saying that
it's actually a FrameManagerImpl behind. Adding a virtual destructor
fixes that.
This commit is contained in:
Samuel Thibault
2022-03-15 23:26:20 +01:00
parent 43d07abec4
commit dab5457620
+1
View File
@@ -51,6 +51,7 @@ class FrameManager {
virtual void queueFrame(speechPlayer_frame_t* frame, unsigned int minNumSamples, unsigned int numFadeSamples, int userIndex, bool purgeQueue)=0; virtual void queueFrame(speechPlayer_frame_t* frame, unsigned int minNumSamples, unsigned int numFadeSamples, int userIndex, bool purgeQueue)=0;
virtual const speechPlayer_frame_t* const getCurrentFrame()=0; virtual const speechPlayer_frame_t* const getCurrentFrame()=0;
virtual const int getLastIndex()=0; virtual const int getLastIndex()=0;
virtual ~FrameManager() {};
}; };
#endif #endif