Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.9
-
cpp compiler of thrift 0.9.0 on Linux 2.6.32-220.el6.x86_64
-
Patch Available
Description
In file compiler/cpp/src/parse/t_function.h
class t_function : public t_doc {
35 public:
36 t_function(t_type* returntype,
37 std::string name,
38 t_struct* arglist,
39 bool oneway=false) :
40 returntype_(returntype),
41 name_(name),
42 arglist_(arglist),
43 oneway_(oneway)
This is the destructor implementation.
63 ~t_function() {}
destructor should deallocate memroy for xceptions_. but destructor implementation does not do resource deallocation.
which sometimes causes Resource Leak.
Possible patch:
~t_function() {
delete xceptions_;
xceptions_ = NULL;
}