Kaydet (Commit) 26e18c95 authored tarafından Jian Fang Zhang's avatar Jian Fang Zhang

#120078# add virtual destructor to WW8 resource model base classes to avoid…

#120078# add virtual destructor to WW8 resource model base classes to avoid memory leak, includes Value, Properties, Table ... 

Found by: zhangjf
Patch by: zhangjf
üst 7dcea9c7
...@@ -138,6 +138,7 @@ public: ...@@ -138,6 +138,7 @@ public:
*/ */
virtual void sprm(Sprm & sprm) = 0; virtual void sprm(Sprm & sprm) = 0;
virtual ~Properties(){}
}; };
/** /**
...@@ -154,6 +155,8 @@ public: ...@@ -154,6 +155,8 @@ public:
@param ref reference to properties of the entry @param ref reference to properties of the entry
*/ */
virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref) = 0; virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref) = 0;
virtual ~Table() {}
}; };
/** /**
...@@ -171,6 +174,8 @@ public: ...@@ -171,6 +174,8 @@ public:
*/ */
virtual void data(const sal_uInt8* buf, size_t len, virtual void data(const sal_uInt8* buf, size_t len,
writerfilter::Reference<Properties>::Pointer_t ref) = 0; writerfilter::Reference<Properties>::Pointer_t ref) = 0;
virtual ~BinaryObj(){}
}; };
/** /**
...@@ -271,6 +276,8 @@ public: ...@@ -271,6 +276,8 @@ public:
@param info the information @param info the information
*/ */
virtual void info(const string & info) = 0; virtual void info(const string & info) = 0;
virtual ~Stream() {}
}; };
/** /**
...@@ -322,6 +329,8 @@ public: ...@@ -322,6 +329,8 @@ public:
Returns string representation of this value. Returns string representation of this value.
*/ */
virtual string toString() const = 0; virtual string toString() const = 0;
virtual ~Value() {}
}; };
/** /**
...@@ -373,6 +382,8 @@ public: ...@@ -373,6 +382,8 @@ public:
Returns string repesentation of sprm. Returns string repesentation of sprm.
*/ */
virtual string toString() const = 0; virtual string toString() const = 0;
virtual ~Sprm() {}
}; };
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment