Fix unnecessary pinning in `btreefile.LeafPage`
We pin an underlying page N times too many whenever we instantiate a new LeafPage class, due to the constructor of the BTreeFilePageTuple. What we want is a tuple that acts like a _weak_ reference to the underlying page, and only make it a _strong_ reference whenever this tuple escapes the scope of the btree-internal classes (e.g. in `BTreeFile.addTuple`). Right now, I just add an `unpin()` call in the constructor of the Tuple, and then pin it whenever I know that it escapes the scope of the btree package. Maybe there's a more graceful way of doing it. I have no idea.
Showing
+30 -7
Please register or sign in to comment