fixed SerializeHelper include and delete

This commit is contained in:
Matej Sekoranja
2010-12-27 11:33:34 +01:00
parent 9cbd953c34
commit 8f8502f6e0
2 changed files with 7 additions and 4 deletions

View File

@@ -91,7 +91,10 @@ namespace epics {
break;
}
}
static String emptyString;
// TODO consider by reference !!!
String SerializeHelper::deserializeString(ByteBuffer* buffer,
DeserializableControl* control) {
@@ -110,15 +113,15 @@ namespace epics {
break;
}
String s = String(retBuffer, size);
delete retBuffer;
delete[] retBuffer;
return s;
} catch(...) {
delete retBuffer; // remove the buffer
delete[] retBuffer; // remove the buffer
throw;
}
}
else
return String("");
return emptyString;
}
}