-

   rss_forum_sources_ru

 - e-mail

 

 -

 LiveInternet.ru:
: 29.07.2007
:
:
: 80

:


goto vs break & continue

, 19 2020 . 13:02 +
D_KEY:
applegame @
PQClear libpq , scope(exit) Connection.

. , .

scope(exit)

, . ? :)

?

"" . , , RAII .

C++ lock, .

, , .

, , . .

.

"". , RAII bracket pattern . "" , - "" .

scope(...) ( using/with/try-with-resources, , ) RAII.

scope(exit) bracket pattern, bracket pattern, scope(exit), ? scope(exit) , try...catch, ;)
, , scope(exit) finally, .

D_KEY @
RAII . , /.
, , .

, bracket pattern RAII ?


korvin @
applegame @
defer (Go?)



    f, err := os.Open("some/file")
    if err != nil { return err }
    defer f.Close()

, , try-with-resources? with*- ?

https://forum.sources.ru/index.php?showtopic=362619&view=findpost&p=3834610

:  

: [1] []
 

:
: 

: ( )

:

  URL