views:

34

answers:

1

Does anyone have suggests for life-cycle names. Lifecyle functions are those that control the creation and termination of software engineering constructs.

Examples:

  • new / delete
  • init / finish
  • create / destroy
  • connect / disconnect
  • constructor / destructor

Consider in the following scenario:

myObjectPtr = myObjectCreate();

myObjectDoSomething(myObjectPtr,1,2.34);
myObjectDoSomethingElse(myObjectPtr,"a string");

myObjectDestroy(myObjectPtr);
+1  A: 

The ones you have listed sound good. In general I'd stick with a paradigm that's already in place to make your code easier to read and maintain. In particular, the language or framework you're developing in likely has one already - I'd go with that. When in Rome...

fbrereto