確かに、aを使用できます @try
-@catch
-@finally
ブロック、 @catch
省略。
MyConnection * connection = [ConnectionPool ConnectionWithDetails: @"host/server/port/etc"];
@try {
[connection doSomething];
}
@finally {
[ConnectionPool ReleaseConnection: connection];
}
どのように終了しても @try
ブロック、 @finally
ブロックが実行されます。