2
0
mirror of synced 2025-02-23 14:58:12 +00:00

bind/objc: fix incorrect objc reference handling in RefTracker

The objc reference handling has bug on assigning different refnum
to the same ios object. The reason for this is that the
RefTracker _refs is not properly initialized thus incorrect
reference check in assignRefnumAndIncRefcount.

Change-Id: Id86423dcf378d11e9056bf7c7ecb646333a94a04
Reviewed-on: https://go-review.googlesource.com/21120
Reviewed-by: Elias Naur <elias.naur@gmail.com>
This commit is contained in:
Ernest Chiang 2016-03-25 11:19:16 +08:00 committed by Elias Naur
parent 45290c0217
commit d181647601

View File

@ -270,6 +270,7 @@ nstring go_seq_from_objc_string(NSString *s) {
self = [super init];
if (self) {
_next = 42;
_refs = [[NSMutableDictionary alloc] init];
_objs = [[NSMutableDictionary alloc] init];
}
return self;