Skip to content

Commit

Permalink
BUG: copy index slice causing memory leak described in #467
Browse files Browse the repository at this point in the history
  • Loading branch information
wesm committed Dec 9, 2011
1 parent b1ca192 commit 2a0c9ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pandas/core/internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,8 @@ def _add_new_block(self, item, value):

# hm, elaborate hack?
loc = self.items.get_loc(item)
new_block = make_block(value, self.items[loc:loc+1], self.items)
new_block = make_block(value, self.items[loc:loc+1].copy(),
self.items)
self.blocks.append(new_block)

def _find_block(self, item):
Expand Down

0 comments on commit 2a0c9ac

Please sign in to comment.