+ After rewriting to s1.fun() it doesn't even take valgrind memory checker to crash with double free. Anyway, it's interesting, when is that useful to call "delete this"?
The program will never work as mentioned. Since s1 object is in stack you have to call the method using dot operator.
Anyway, deleting the "this" object from a method means, that object has no life after the method invocation and it will work fine for all the objects those are in heap. But it will crash the program if invoked using an object in stack as delete will work only for heap objects.
So its not a good practice to delete the object from a method as we don't know where the user of a class is going to create the object, in heap or stack.