Having a single function for freeing every single type that Getty supports isn't scalable, is a pain to maintain, and doesn't work well with things like attributes.
free's demise was always inevitable and now the day of reckoning has come!
Proposal
First, the logic in getty.de.free will be moved into a relevant Deserialization Block, which will now allowed to define an optional function (called free) for freeing resources.
Then, getty.de.free will be updated to simply walk through user DBs, type-defined DBs, serializer DBs, and getty.default_dt to find which free function to call.
Problem
Having a single function for freeing every single type that Getty supports isn't scalable, is a pain to maintain, and doesn't work well with things like attributes.
free
's demise was always inevitable and now the day of reckoning has come!Proposal
First, the logic in
getty.de.free
will be moved into a relevant Deserialization Block, which will now allowed to define an optional function (calledfree
) for freeing resources.Then,
getty.de.free
will be updated to simply walk through user DBs, type-defined DBs, serializer DBs, andgetty.default_dt
to find whichfree
function to call.Alternatives
No response
Additional Context
No response