mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-19 11:45:45 +00:00
ICU-1079 fix memory leak; delete RBT.Data objects
X-SVN-Rev: 5985
This commit is contained in:
parent
e1f690c159
commit
6fbdc4ddeb
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue