Menu

#10 Tuple memory leak

Design Problem
open
7
2001-01-14
2001-01-14
No

Tuple is designed not to release its contents, because it was intended to provide a sneaky backdoor to the innards of some Data descendants by overlaying them when they inherit from it.

However, some functions return an explicitly constructed Tuple, and so the above behavior is wrong.

Resolution: make a _Tuple class which doesn't, and a Tuple class which does free its contents.

Additionally, roll TupleBase and _TupleBase into Tuple and _Tuple respectively, making the interface simpler and more coherent.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB