Commit 8f8985b
authored
Avoid MonitorObjectCollection to grow in size (#2169)
Currently the published objects are inserted in the
`MonitorObjectCollection` via the `TObjArray::Add()` method,
which always appends new elements at the end of the array.
When un-publishing objects, they are removed via the
`TObjArray::Remove()` method, which does not reduce the size of the
TObjArray. Instead, the removed slots are set to `nullptr`.
The proposed solution is to add a call to `TObjArray::Compress()`
after `TObjArray::Remove()`, which forces the removal of empty
slots from the array.1 parent cd342d8 commit 8f8985b
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| |||
0 commit comments