ICU-1079 fix memory leak; delete RBT.Data objects

X-SVN-Rev: 5985
This commit is contained in:
Alan Liu 2001-10-01 20:07:29 +00:00
parent e1f690c159
commit 6fbdc4ddeb

View file

@ -255,6 +255,12 @@ Entry::Entry() {
Entry::~Entry() {
if (entryType == PROTOTYPE) {
delete u.prototype;
} else if (entryType == RBT_DATA) {
// The data object is shared between instances of RBT. The
// entry object owns it. It should only be deleted when the
// transliterator component is being cleaned up. Doing so
// invalidates any RBTs that the user has instantiated.
delete u.data;
}
}