Is it OK to do: KSP/Mat/Vec/etc object; if(object) KSP/Mat/Vec/etcDestroy(object) It other words, are default constructors initializing the object to NULL, or is there an other dedicated way to check if an object was actually allocated? I could not easily deduce it from the code... Many thanks, Dominik