[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDecrementExtraRefCountWasZero

From: Ivan Vučica
Subject: Re: NSDecrementExtraRefCountWasZero
Date: Sun, 03 Dec 2017 18:17:55 +0000

ned, 3. pro 2017. u 11:17 David Chisnall <address@hidden> napisao je:

That said, I’d be far more inclined to suggest that we depend on Objective-C++ and libobjc2 than clang.  GSIMap, for example, is quite painful to use and would be a lot cleaner in C++.  In other code bases, I can simply do things like std::unordered_map<int, id __weak> and all of the memory management works correctly.  Before we had reliable ARC support, I had some C++ strong_object and weak_object wrappers that called the relevant runtime functions in their constructors and destructors (and, for weak, implemented an implicit cast operator to a strong object type that called the function to materialise a strong reference).

I am not a fan of C++. I’d be okay with this only if it meant no regressions in output code size and, more importantly, compile times.
Sent from Gmail Mobile on iPad

reply via email to

[Prev in Thread] Current Thread [Next in Thread]