A process should lock and sweep registry data to garbage collect unreferenced. #422 (comment) covers many of the issues will implementing such a solution. During this time, the registry may be in down time or read only mode.
#461 would be a prerequisite of this implementation.