Commit 8f5adc8
Fix potential memory leak in
Summary:
According to `InvertedLists` API conventions, pointers returned from `get_ids` must be released by `release_ids`, which is violated by `get_single_id`. Note that all subclasses of `InvertedLists` which overwrite `release_ids` also overwrite `get_single_id`, the code change has no actual runtime impact with respect to existing code. However, if someone wants to implement his or her `InvertedLists` subclass and chooses not to overwrite `get_single_id`, this code change will help him or her to avoid potential memory leak.
Pull Request resolved: #2412
Reviewed By: alexanderguzhva
Differential Revision: D39167152
Pulled By: mdouze
fbshipit-source-id: d2daef801a4c375d5e2c80ea1fdf259bf31e4b3dInvertedLists default implementation (#2412)1 parent fc13d84 commit 8f5adc8
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
0 commit comments