Ah, right, I'm following you on the original code snippet now.

Yes, cleanup() isn't really worse than unpersist() wrt the second snippet.  That tends to argue more for the removal of unpersist from the API than the inclusion of cleanup (and, yes, I realize that you are not arguing for the inclusion of cleanup in the public API.)  Ideally, the automatic garbage collection introduced with this PR is sufficient to handle all of the cleanup of RDD data and metadata, and thereafter a public unpersist() or cleanup() is no more needed than is an explicit means to destroy and garbage collect Java objects.  If we do want to maintain an explicit unpersist/cleanup mechanism, I think it should be behind a system administration kind of interface and protected by lots of "You're going to shoot your eye out!" warnings.