@@ -13,10 +13,11 @@ * file. */ #import "OFConcreteValue.h" #import "OFMethodSignature.h" +#import "OFString.h" #import "OFOutOfRangeException.h" @implementation OFConcreteValue @synthesize objCType = _objCType; @@ -26,13 +27,12 @@ { self = [super initWithBytes: bytes objCType: objCType]; @try { _size = OFSizeOfTypeEncoding(objCType); - _objCType = objCType; + _objCType = OFStrDup(objCType); _bytes = OFAllocMemory(1, _size); - memcpy(_bytes, bytes, _size); } @catch (id e) { [self release]; @throw e; } @@ -41,10 +41,11 @@ } - (void)dealloc { OFFreeMemory(_bytes); + OFFreeMemory(_objCType); [super dealloc]; } - (void)getValue: (void *)value size: (size_t)size