Is it possible that upon calling a constructor also the object be initialized to null ??
I need it in my program for the condition where if an exception is thrown in construction then object is initialized to null
I’ve several options for that
1. Creating a boolean field saying valid or not to show its null..
2. Initialzing all member objects to null and then returning
But all of these don’t acutually set the value to null just make it feel like its null..
Any more suggestion ??
I would say if a no-fail constructor isn’t feasible, it’s probably better to throw the exception and let the calling code invalidate the pointer how they see fit.