
26 Jun
2020
26 Jun
'20
9:31 p.m.
Victor Stinner schrieb am 26.06.20 um 14:39:
Well, the general problem is to track when the caller ends using a resource.
Although that is less of a problem if you only allow exposing the internal data representation and nothing else. In that case, you can tie the lifetime of the data access to the lifetime of the object.
Minus moving GCs, as Carl also pointed out. But even there, you could get away (probably for quite a while) with pinning the data if someone asked for it.
Stefan