()
| 3983 | |
| 3984 | |
| 3985 | def test_object_leak_in_numpy_array(): |
| 3986 | # ARROW-6876 |
| 3987 | arr = pa.array([{'a': 1}]) |
| 3988 | np_arr = arr.to_pandas() |
| 3989 | assert np_arr.dtype == np.dtype('object') |
| 3990 | obj = np_arr[0] |
| 3991 | refcount = sys.getrefcount(obj) |
| 3992 | assert sys.getrefcount(obj) == refcount |
| 3993 | del np_arr |
| 3994 | assert sys.getrefcount(obj) == refcount - 1 |
| 3995 | |
| 3996 | |
| 3997 | def test_object_leak_in_dataframe(): |