Memory leaks are preferable so as not to slow down

Chrome Documentation:

NOTE. Both Singleton and base :: LazyInstance provide "leaky" traits for a global leak at shutdown. This is often recommended (with the possible exception, in library code, where the code can be dynamically loaded into another process address space or when data needs to be cleared when the process ends) so as not to slow down the work.

In this case, is this acceptable?

+4
source share
2 answers

"" , . , , , ( Chromium, : - ).

, , , . , . , singleton - , .

, , .

, . , , .

, , , , . , .

. , , , , , , , , "". YMMV.

, , , . , Chromium , , , . , .

, , , , .

, , , ( , , ).

, ( , ). (ex: ). ( - , , ).

( ) , , , , (, dylib).

( ), ( , ), , , , , . , , , . , , , , .

, "" . . , , , .

+3

( ) . , Linux-, .

+1

Source: https://habr.com/ru/post/1621121/


All Articles