Resource cleanup is useful both with and without generic programming. You can write typesafe (this has a specific definition), generic code with manual cleanup or with automatic cleanup.
But generic programming is not useful without resource cleanup. Generic programming algorithms, as I keep saying, relies on value semantics. If the algorithms are working on things that, say, have mutable state, then the generic algorithm breaks. Value semantics means type safe automatic resource cleanup becomes a necessity and thus should be included in the definition. People only resist it because it would mean their language can't be generic.
For example, a std::vector is typesafe, in that you can't have type violations (unless you screw with casting---C++ isn't the best example), generic in that it works for all T, but it won't clean up whatever those T*s point to.
No, that's why you store objects in vectors, not raw pointers. If you store objects in vectors, it will clean up all Ts, including smart pointers.
Plenty of languages implement generic programming with reference semantics just fine.
No, they don't. eg Java's generics aren't generic. They're just syntactic sugar for type casting.
Except it is, using the definitions of "generic" that everyone else uses.
"Everyone else" uses incomplete definitions of generic. It's incomplete given the experience of generic programming, namely in C++. Your "generic vector" does not allow generic algorithms to operate on them because of reference semantics and non-generic resource cleanup.
It's not about care it's about parameterization over types. And you can certainly parameterize over types in C, with sufficient effort.
The parametrization is incomplete if it doesn't include type-aware cleanup (and copy and move and even swap).
Picking one example resource out does not make my example incorrect. So well done for ignoring the point and making a tangential, irrelevant criticism rather than addressing the point I was making.
Really? But you thought nothing of reducing "resource management" down to a leaked memory strawman completely irrelevant to the larger picture of value semantics. I love when people accuse me of apparently doing something when they were the ones to actually do it first.