Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add decref for list of array in df boxing
  • Loading branch information
densmirn committed May 26, 2020
commit 9d115fd22bcd3483cba9045cba9c096da22130e8
6 changes: 4 additions & 2 deletions sdc/hiframes/boxing.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,9 @@ def box_dataframe(typ, val, c):

col_loc = typ.column_loc[cname]
type_id, col_id = col_loc.type_id, col_loc.col_id
typ_arrs = listobj.ListInstance(c.context, c.builder, types.List(arr_typs[i]),
builder.extract_value(dataframe.data, type_id))
list_type = types.List(arr_typs[i])
list_val = builder.extract_value(dataframe.data, type_id)
typ_arrs = listobj.ListInstance(c.context, c.builder, list_type, list_val)
arr = typ_arrs.getitem(col_id)

if dtype == string_type:
Expand All @@ -246,6 +247,7 @@ def box_dataframe(typ, val, c):
# context.nrt.incref(builder, arr_typ, arr)
pyapi.dict_setitem(df_dict, cname_obj, arr_obj)

c.context.nrt.decref(c.builder, list_type, typ_arrs.value)
pyapi.decref(arr_obj)
pyapi.decref(cname_obj)

Expand Down