Repository navigation
Commit 46cf332
committed
ARROW-8801: [Python] Fix memory leak when converting datetime64-with-tz data to pandas
An array object was failing to be decref'd on the DatetimeTZ conversion path. The code is slightly complicated by the different calling reference ownership semantics of the Array/ChunkedArray conversion path (which expects to own the created array when it calls `GetSeriesResult` while the `GetResultBlock` code retains its array in a `OwnedRefNoGIL`). This was the simplest thing that fixed the memory leak for me. There is leak checking code that can be used to verify this in python/scripts/test_leak.py (just run the script).
Closes apache#7522 from wesm/ARROW-8801
Authored-by: Wes McKinney <wesm@apache.org>
Signed-off-by: Wes McKinney <wesm@apache.org>1 parent 7cebe08 commit 46cf332
2 files changed
Lines changed: 34 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
406 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
407 | 413 | | |
408 | 414 | | |
409 | 415 | | |
410 | 416 | | |
411 | | - | |
| 417 | + | |
412 | 418 | | |
413 | 419 | | |
414 | 420 | | |
| |||
420 | 426 | | |
421 | 427 | | |
422 | 428 | | |
423 | | - | |
424 | | - | |
| 429 | + | |
| 430 | + | |
425 | 431 | | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
426 | 440 | | |
427 | 441 | | |
428 | 442 | | |
| |||
1269 | 1283 | | |
1270 | 1284 | | |
1271 | 1285 | | |
1272 | | - | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
1273 | 1291 | | |
1274 | 1292 | | |
1275 | 1293 | | |
1276 | 1294 | | |
1277 | 1295 | | |
1278 | 1296 | | |
| 1297 | + | |
1279 | 1298 | | |
1280 | 1299 | | |
1281 | 1300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
100 | 109 | | |
101 | | - | |
| 110 | + | |
0 commit comments