@@ -335,10 +335,13 @@ length: (size_t)UTF8StringLength; /*! * @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. * * @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 @@ -349,10 +352,13 @@ freeWhenDone: (bool)freeWhenDone; /*! * @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. * * @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 @@ -594,10 +600,13 @@ length: (size_t)UTF8StringLength; /*! * @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. * * @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 @@ -609,10 +618,13 @@ /*! * @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. * * @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