summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qbytedata_p.h
diff options
context:
space:
mode:
authorRobin Burchell <robin+qt@viroteck.net>2012-03-22 21:44:13 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-31 16:46:40 +0200
commit47728445a5e7317ed2123a8824c54a012eeee142 (patch)
tree762385979cf489c0cb92a061ed7bde3cd077c851 /src/corelib/tools/qbytedata_p.h
parentad921347f701ea7f732633c9c584be9300317537 (diff)
Remove all calls to, and deprecate qMalloc, qRealloc and qFree.
Callers should just call the standard allocation functions directly. Adding an extra function call onto all basic memory management for the sake of making it instrumentable in rare cases isn't really fair to everyone else. What's more, this wasn't completely reliable, as not everything was using them in a number of places. Memory management can still be overridden using tricks like LD_PRELOAD if needed. Their aligned equivilents cannot be deprecated, as no standard equivilents exist, although investigation into posix_memalign(3) is a possibility for the future. Change-Id: Ic5f74b14be33f8bc188fe7236c55e15c36a23fc7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/tools/qbytedata_p.h')
-rw-r--r--src/corelib/tools/qbytedata_p.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/tools/qbytedata_p.h b/src/corelib/tools/qbytedata_p.h
index 763b71c8f3..2deff997d2 100644
--- a/src/corelib/tools/qbytedata_p.h
+++ b/src/corelib/tools/qbytedata_p.h
@@ -102,7 +102,7 @@ public:
bufferCompleteSize += bd.size();
}
- // return the first QByteData. User of this function has to qFree() its .data!
+ // return the first QByteData. User of this function has to free() its .data!
// preferably use this function to read data.
inline QByteArray read()
{
@@ -110,14 +110,14 @@ public:
return buffers.takeFirst();
}
- // return everything. User of this function has to qFree() its .data!
+ // return everything. User of this function has to free() its .data!
// avoid to use this, it might malloc and memcpy.
inline QByteArray readAll()
{
return read(byteAmount());
}
- // return amount. User of this function has to qFree() its .data!
+ // return amount. User of this function has to free() its .data!
// avoid to use this, it might malloc and memcpy.
inline QByteArray read(qint64 amount)
{
@@ -128,7 +128,7 @@ public:
return byteData;
}
- // return amount bytes. User of this function has to qFree() its .data!
+ // return amount bytes. User of this function has to free() its .data!
// avoid to use this, it will memcpy.
qint64 read(char* dst, qint64 amount)
{