From d181647601c71d28fec61b46ca4959e1407918e8 Mon Sep 17 00:00:00 2001 From: Ernest Chiang Date: Fri, 25 Mar 2016 11:19:16 +0800 Subject: [PATCH] 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 --- bind/objc/seq_darwin.m.support | 1 + 1 file changed, 1 insertion(+) diff --git a/bind/objc/seq_darwin.m.support b/bind/objc/seq_darwin.m.support index 2c604b0..596b9b0 100644 --- a/bind/objc/seq_darwin.m.support +++ b/bind/objc/seq_darwin.m.support @@ -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;