Obtain() obtains the interface, Release() releases it.
In general usage you don't call these direct Exec does it for you when you call GetInterface(). Often all they do is increment or decrement a counter, but some libraries do more, setup context info etc.
The CreateNewProc() example shows Obtain() and Release() being call in a program with no clibrary startup code, so the exec interface is got from SysBase by hand, thus you have to Obtain() it.
I'm almost but not quite reasonably sure that Obtain() and Release() need to be called on the same task, and you shouldn't use the interface before call Obtain() or after calling Release().
As almost all user code uses the C library startup 90% of the time you don't need to care about this.
Obtain() and Realease() are documented in the Libraries and Devices.pdf
It says:
If an interface pointer is passed along to another entity, for example another thread, then that entity must call
Obtain() before using the interface. Likewise, when the entity is done, it needs to call Release().
However I supsect this is not needed in the child proc in the CreatenewProc() example because it is a Child and so is not going to outlive it's parent. Either that ot the example is wrong in that respect!
The example in the Migration guide is different. It Obtains() the interface before the task as I suppose the task is to be asynchronously and the main program isn't going to wait. So is avoiding race condition.
I'm not sure very much software uses interfaces in the way object orientated data way the example in Migration guide shows.
Was there specific reason why you were investigationg them?