Index: ChangeLog ================================================================== --- ChangeLog +++ ChangeLog @@ -2,10 +2,16 @@ * Changes of existing features or bugfixes + New features This file only contains the most significant changes. +ObjFW 1.0.2 -> ObjFW 1.0.3, 2023-09-14 + * Fixes -[OFConcreteData initWithItemSize:] not setting freeWhenDone to true, + which resulted in a memory leak + * Fixes -[OFData initWithContentsOfIRI:] freeing the buffer in @catch instead + of @finally, which resulted in a memory leak + ObjFW 1.0.1 -> ObjFW 1.0.2, 2023-09-11 * The build system has been updated to fix building .frameworks and to build them differently for macOS and iOS ObjFW 1.0 -> ObjFW 1.0.1, 2023-09-10 Index: extra.mk.in ================================================================== --- extra.mk.in +++ extra.mk.in @@ -1,11 +1,11 @@ OBJFW_SHARED_LIB = @OBJFW_SHARED_LIB@ OBJFW_STATIC_LIB = @OBJFW_STATIC_LIB@ OBJFW_FRAMEWORK = @OBJFW_FRAMEWORK@ OBJFW_LIB_MAJOR = 1 OBJFW_LIB_MINOR = 0 -OBJFW_LIB_PATCH = 0 +OBJFW_LIB_PATCH = 1 OBJFW_LIB_MAJOR_MINOR = ${OBJFW_LIB_MAJOR}.${OBJFW_LIB_MINOR} OBJFWRT_SHARED_LIB = @OBJFWRT_SHARED_LIB@ OBJFWRT_STATIC_LIB = @OBJFWRT_STATIC_LIB@ OBJFWRT_FRAMEWORK = @OBJFWRT_FRAMEWORK@ Index: src/OFConcreteData.m ================================================================== --- src/OFConcreteData.m +++ src/OFConcreteData.m @@ -36,10 +36,11 @@ @try { if (itemSize == 0) @throw [OFInvalidArgumentException exception]; _itemSize = itemSize; + _freeWhenDone = true; } @catch (id e) { [self release]; @throw e; } Index: src/OFData.m ================================================================== --- src/OFData.m +++ src/OFData.m @@ -308,15 +308,16 @@ count += length; } objc_autoreleasePoolPop(pool); } @catch (id e) { - OFFreeMemory(buffer); OFFreeMemory(items); [self release]; @throw e; + } @finally { + OFFreeMemory(buffer); } @try { self = [self initWithItemsNoCopy: items count: count