I looked at this during the “should forget
be unsafe” discussion, and I do believe it should be possible to have destructors guaranteed while having reference counting. (Specifically, the guarantee would be that an object would be guaranteed to be destroyed by the end of it’s valid lifetime.) Rc
s containing only 'static
data could be used exactly as today, since they would be okay to leak. (Their valid lifetime is “forever”.) Rc
s containing non-'static
data would either be statically prevented from containing cycles (which would require a way to specify that one lifetime strictly outlives another) or would be used with a scope-guard cycle collector that makes sure any cycles are cleaned up.