File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -3957,7 +3957,7 @@ - (void)setReceiveFilter:(GCDAsyncUdpSocketReceiveFilterBlock)inFilterBlock with
3957
3957
{
3958
3958
NSAssert (inFilterQueue, @" Must provide a dispatch_queue in which to run the filter block." );
3959
3959
3960
- newFilterBlock = Block_copy ( inFilterBlock) ;
3960
+ newFilterBlock = [ inFilterBlock copy ] ;
3961
3961
newFilterQueue = inFilterQueue;
3962
3962
dispatch_retain (newFilterQueue);
3963
3963
}
@@ -3969,6 +3969,12 @@ - (void)setReceiveFilter:(GCDAsyncUdpSocketReceiveFilterBlock)inFilterBlock with
3969
3969
3970
3970
dispatch_block_t block = ^{
3971
3971
3972
+ if (filterBlock)
3973
+ [filterBlock release ];
3974
+
3975
+ if (filterQueue)
3976
+ dispatch_release (filterQueue);
3977
+
3972
3978
filterBlock = newFilterBlock;
3973
3979
filterQueue = newFilterQueue;
3974
3980
};
You can’t perform that action at this time.
0 commit comments