Index: src/OFData.h ================================================================== --- src/OFData.h +++ src/OFData.h @@ -118,10 +118,13 @@ itemSize: (size_t)itemSize; /** * @brief Creates a new OFData with the specified `count` items of size 1 by * taking over ownership of the specified items pointer. + * + * If initialization fails for whatever reason, the passed memory is *not* + * free'd if `freeWhenDone` is true. * * @param items The items to store in the OFData * @param count The number of items * @param freeWhenDone Whether to free the pointer when it is no longer needed * by the OFData @@ -132,10 +135,13 @@ freeWhenDone: (bool)freeWhenDone; /** * @brief Creates a new OFData with the specified `count` items of the * specified size by taking ownership of the specified items pointer. + * + * If initialization fails for whatever reason, the passed memory is *not* + * free'd if `freeWhenDone` is true. * * @param items The items to store in the OFData * @param count The number of items * @param itemSize The item size of a single item in bytes * @param freeWhenDone Whether to free the pointer when it is no longer needed @@ -210,10 +216,13 @@ /** * @brief Initializes an already allocated OFData with the specified `count` * items of size 1 by taking over ownership of the specified items * pointer. + * + * If initialization fails for whatever reason, the passed memory is *not* + * free'd if `freeWhenDone` is true. * * @param items The items to store in the OFData * @param count The number of items * @param freeWhenDone Whether to free the pointer when it is no longer needed * by the OFData @@ -225,10 +234,13 @@ /** * @brief Initializes an already allocated OFData with the specified `count` * items of the specified size by taking ownership of the specified * items pointer. + * + * If initialization fails for whatever reason, the passed memory is *not* + * free'd if `freeWhenDone` is true. * * @param items The items to store in the OFData * @param count The number of items * @param itemSize The item size of a single item in bytes * @param freeWhenDone Whether to free the pointer when it is no longer needed Index: src/OFString.h ================================================================== --- src/OFString.h +++ src/OFString.h @@ -324,12 +324,12 @@ /** * @brief Creates a new OFString from a UTF-8 encoded C string without copying * the string, if possible. * - * If initialization fails for whatever reason, the passed C string is free'd - * if `freeWhenDone` is true. + * If initialization fails for whatever reason, the passed C string is *not* + * free'd if `freeWhenDone` is true. * * @note OFMutableString always creates a copy! * * @param UTF8String A UTF-8 encoded C string to initialize the OFString with * @param freeWhenDone Whether to free the C string when the OFString gets @@ -341,12 +341,12 @@ /** * @brief Creates a new OFString from a UTF-8 encoded C string with the * specified length without copying the string, if possible. * - * If initialization fails for whatever reason, the passed C string is free'd - * if `freeWhenDone` is true. + * If initialization fails for whatever reason, the passed C string is *not* + * free'd if `freeWhenDone` is true. * * @note OFMutableString always creates a copy! * * @param UTF8String A UTF-8 encoded C string to initialize the OFString with * @param UTF8StringLength The length of the UTF-8 encoded C string @@ -579,12 +579,12 @@ /** * @brief Initializes an already allocated OFString from an UTF-8 encoded C * string without copying the string, if possible. * - * If initialization fails for whatever reason, the passed C string is free'd - * if `freeWhenDone` is true. + * If initialization fails for whatever reason, the passed C string is *not* + * free'd if `freeWhenDone` is true. * * @note OFMutableString always creates a copy! * * @param UTF8String A UTF-8 encoded C string to initialize the OFString with * @param freeWhenDone Whether to free the C string when it is not needed @@ -597,12 +597,12 @@ /** * @brief Initializes an already allocated OFString from an UTF-8 encoded C * string with the specified length without copying the string, if * possible. * - * If initialization fails for whatever reason, the passed C string is free'd - * if `freeWhenDone` is true. + * If initialization fails for whatever reason, the passed C string is *not* + * free'd if `freeWhenDone` is true. * * @note OFMutableString always creates a copy! * * @param UTF8String A UTF-8 encoded C string to initialize the OFString with * @param UTF8StringLength The length of the UTF-8 encoded C string