R.H. ending and casablanca ending are very similar
i call it a unhappy happy ending , rick and joe don't get the girl but they get back their self respect , what they both sacrifice is for a greater good , little wonder i love both of these films , as rick says at the end of casablanca ,
" I'm no good at being noble, but it doesn't take much to see that the problems of three little people don't amount to a hill of beans in this crazy world. Someday you'll understand that."
there is more than important things than just love