aboutsummaryrefslogtreecommitdiff
path: root/xsde/cxx/serializer/attribute-validation-source.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xsde/cxx/serializer/attribute-validation-source.cxx')
-rw-r--r--xsde/cxx/serializer/attribute-validation-source.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/xsde/cxx/serializer/attribute-validation-source.cxx b/xsde/cxx/serializer/attribute-validation-source.cxx
index 79ae256..7dea3c3 100644
--- a/xsde/cxx/serializer/attribute-validation-source.cxx
+++ b/xsde/cxx/serializer/attribute-validation-source.cxx
@@ -329,6 +329,7 @@ namespace CXX
<< "this->_start_attribute (ns, name);"
<< endl;
else
+ {
os << "bool r;"
<< "if (ns == 0 || *ns == '\\0')" << endl
<< "r = this->_start_attribute (name);"
@@ -336,13 +337,20 @@ namespace CXX
<< "r = this->_start_attribute (ns, name);"
<< endl
<< "if (free)"
- << "{"
- << "delete[] ns;"
- << "delete[] name;"
- << "}"
+ << "{";
+
+ if (!custom_alloc)
+ os << "delete[] ns;"
+ << "delete[] name;";
+ else
+ os << "::xsde::cxx::free (ns);"
+ << "::xsde::cxx::free (name);";
+
+ os << "}"
<< "if (!r)" << endl
<< "return;"
<< endl;
+ }
os << "this->" << eserialize (a) << " ();"
<< endl