summaryrefslogtreecommitdiff
path: root/src/pugixml.cpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-08-29 16:58:57 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-08-29 16:58:57 +0000
commit61a94d6223a422abae0396c931c11517ba05774b (patch)
tree1e5aaa0f73c5478eb60d892aa8b58cc3c765e70e /src/pugixml.cpp
parent343653c916026aee9b5cb2fd580863e49dade30f (diff)
XPath: Fixed variable memory leaks for MSVC6
git-svn-id: http://pugixml.googlecode.com/svn/trunk@704 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'src/pugixml.cpp')
-rw-r--r--src/pugixml.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index 40acb64..8ac5627 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -5543,9 +5543,9 @@ namespace
}
}
- template <typename T> void delete_xpath_variable(xpath_variable* var)
+ template <typename T> void delete_xpath_variable(T* var)
{
- static_cast<T*>(var)->~T();
+ var->~T();
global_deallocate(var);
}
@@ -5554,19 +5554,19 @@ namespace
switch (type)
{
case xpath_type_node_set:
- delete_xpath_variable<xpath_variable_node_set>(var);
+ delete_xpath_variable(static_cast<xpath_variable_node_set*>(var));
break;
case xpath_type_number:
- delete_xpath_variable<xpath_variable_number>(var);
+ delete_xpath_variable(static_cast<xpath_variable_number*>(var));
break;
case xpath_type_string:
- delete_xpath_variable<xpath_variable_string>(var);
+ delete_xpath_variable(static_cast<xpath_variable_string*>(var));
break;
case xpath_type_boolean:
- delete_xpath_variable<xpath_variable_boolean>(var);
+ delete_xpath_variable(static_cast<xpath_variable_boolean*>(var));
break;
default: