|
Geometry : |
Subject: [ggl] spacial index
From: Simonson, Lucanus J (lucanus.j.simonson)
Date: 2011-05-01 22:45:54
Adam Wulkiewicz wrote:
> New nodes are smaller than the old ones. They contains a vector of
> pointers or values and variant's id. Old ones contains vector, pointer
> to parent and level's number. Leaf nodes contains also additional
> vector. Moreover shared_ptrs are used so there are references
> counters. Size of the new rtree is bigger probably because I don't
> delete splited nodes. I just clear elements vector for source node
> and use it as the first node, so the memory is still allocated.
Why shared_ptrs? Can't we assign ownership for the nodes to their parents? I would think that we could make deallocation of them explicit and dispense with the overhead of reference counting.
> Thanks Lucanus that you remembered me about this technique. I'll give
> it a try.
I'm glad I could make a positive contribution.
Regards,
Luke
Geometry list run by mateusz at loskot.net