Design By Contract Technique with an example
View Single Post
Yes. Both can be done.
i.e. Checking the validity of a pointer just before returnng to callee in called method or
checking it in callee itself just before using it.
I think first way better!!