For example, the deallocate function for attached classes must not take in arguments and must be of return type void. Similar constraints exist for the others as well. These must be adhered to.
Also, if the user fails to write a deallocate function the compiler must raise an error and state so.