Kaynağa Gözat

Small code reorder to maybe make #3893 happy.

Use the ivar for the -open, so hopefully it lines up with the -close
in dealloc and isn't seen as an unbalanced "open".
Thomas Van Lenten 8 yıl önce
ebeveyn
işleme
baed06e694
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      objectivec/GPBCodedOutputStream.m

+ 1 - 1
objectivec/GPBCodedOutputStream.m

@@ -174,10 +174,10 @@ static void GPBWriteRawLittleEndian64(GPBOutputBufferState *state,
                                 data:(NSMutableData *)data {
   if ((self = [super init])) {
     buffer_ = [data retain];
-    [output open];
     state_.bytes = [data mutableBytes];
     state_.size = [data length];
     state_.output = [output retain];
+    [state_.output open];
   }
   return self;
 }