高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】not a problem - just a hin
not a problem - just a hint
not a problem - just a hint
hi opendwgs,
as i seen, the oddbhostappprogressmeter - interface has
no virtual dtor and is not a child of an interface with a virtual dtor.
i think this is not good, because i have ever to dynamic cast.
can be it is by design, or it was forgotten.
in my sample the dtor of cprogressometerproc is never called,
until i dynamic cast your pointer
a sample:
class cprogessometer : public oddbhostappprogressmeter
{
public:
virtual ~cprogessometerproc()
{
is never called here
}
....
virtual void setlimit(int max) {;}
virtual void start(const char* displaystring = 0) {;}
virtual void meterprogress() {;}
virtual void stop() {;}
};
//---------------------------------------------------------------------------
class cmyodaservices : public exsystemservices, public exhostappservices
{
public:
void addref() {}
void release() {}
virtual oddbhostappprogressmeter* newprogressmeter()
{
return new cprogressometer();
}
virtual void releaseprogressmeter(oddbhostappprogressmeter* pprogressmeter)
{
delete dynamic_cast<cprogessometer*>(pprogressmeter);
}
michael
yes, probably it was forgotten, thank you.
vladimir
|