소스 검색

Fix dangling reference warning on assign object property

This doesn't change the behavior, it just silences this compiler warning
when using FMDB in a project that has the
-Wobjc-property-assign-on-object-type warning flag.

https://clang.llvm.org/docs/AutomaticReferenceCounting.html#property-declarations

The alternative would have been to make this a weak property, but this
would have been a behavior change, and after reading the discussion
https://github.com/ccgus/fmdb/issues/522, I gather that this is
something that shouldn't be done in FMDB without bumping the major
version number.
Daniel Seither 3 년 전
부모
커밋
3e5ecb6fee
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/fmdb/FMDatabasePool.h

+ 1 - 1
src/fmdb/FMDatabasePool.h

@@ -38,7 +38,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 /** Delegate object */
 
-@property (atomic, assign, nullable) id delegate;
+@property (atomic, unsafe_unretained, nullable) id delegate;
 
 /** Maximum number of databases to create */