Skip to content

Commit 7345719

Browse files
committed
Doc to note heap must be initialized before calling MQTTProperties_add eclipse-paho#1378
1 parent fdb9bea commit 7345719

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/MQTTProperties.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2017, 2020 IBM Corp. and others
2+
* Copyright (c) 2017, 2023 IBM Corp. and others
33
*
44
* All rights reserved. This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License v2.0
@@ -127,7 +127,10 @@ typedef struct MQTTProperties
127127
int MQTTProperties_len(MQTTProperties* props);
128128

129129
/**
130-
* Add a property pointer to the property array. There is no memory allocation.
130+
* Add a property pointer to the property array. Memory is allocated in this function,
131+
* so MQTTClient_create or MQTTAsync_create must be called first to initialize the
132+
* internal heap tracking. Alternatively MQTTAsync_global_init() can be called first
133+
* or build with the HIGH_PERFORMANCE option which disables the heap tracking.
131134
* @param props The property list to add the property to.
132135
* @param prop The property to add to the list.
133136
* @return 0 on success, -1 on failure.

0 commit comments

Comments
 (0)