![]() |
【转帖】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 |
所有的时间均为北京时间。 现在的时间是 05:22 PM. |