Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
copy
  • Loading branch information
Chris Yang committed Oct 26, 2022
commit 7b6a5a46ea6d6f4466d61f440d42195109a1b4ff
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ - (instancetype)initWithName:(NSString*)name
taskQueue:(NSObject<FlutterTaskQueue>*)taskQueue {
self = [super init];
NSAssert(self, @"Super init cannot be nil");
_name = name;
_name = [name copy];
_messenger = messenger;
_codec = codec;
_taskQueue = taskQueue;
Expand Down Expand Up @@ -161,7 +161,7 @@ - (instancetype)initWithMethodName:(NSString*)method arguments:(id)arguments {
NSAssert(method, @"Method name cannot be nil");
self = [super init];
NSAssert(self, @"Super init cannot be nil");
_method = method;
_method = [method copy];
_arguments = arguments;
return self;
}
Expand Down Expand Up @@ -218,7 +218,7 @@ - (instancetype)initWithName:(NSString*)name
taskQueue:(NSObject<FlutterTaskQueue>*)taskQueue {
self = [super init];
NSAssert(self, @"Super init cannot be nil");
_name = name;
_name = [name copy];
_messenger = messenger;
_codec = codec;
_taskQueue = taskQueue;
Expand Down Expand Up @@ -313,7 +313,7 @@ - (instancetype)initWithName:(NSString*)name
taskQueue:(NSObject<FlutterTaskQueue>* _Nullable)taskQueue {
self = [super init];
NSAssert(self, @"Super init cannot be nil");
_name = name;
_name = [name copy];
_messenger = messenger;
_codec = codec;
_taskQueue = taskQueue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ - (instancetype)initWithData:(NSData*)data type:(FlutterStandardDataType)type {
NSAssert(data.length % elementSize == 0, @"Data must contain integral number of elements");
self = [super init];
NSAssert(self, @"Super init cannot be nil");
_data = data;
_data = [data copy];
_type = type;
_elementSize = elementSize;
_elementCount = data.length / elementSize;
Expand Down Expand Up @@ -326,7 +326,7 @@ @implementation FlutterStandardReader {
- (instancetype)initWithData:(NSData*)data {
self = [super init];
NSAssert(self, @"Super init cannot be nil");
_data = data;
_data = [data copy];
_range = NSMakeRange(0, 0);
return self;
}
Expand Down