by ComputerGuru · 4y ago · 0 comments
Yeah, but the ergonomics suck. Especially for random cleanup tasks that aren’t necessarily one-object, one-task.
The temp file thing was just an example, actual use case was more domain-specific.
Doesn’t seem much more of a problem? Put a tuple in, get references out, cleanup gets the entire tuple.
If lifetimes get complicated, use refcells and / or Rcs.