[Development] Deprecation of qMalloc/qFree/qRealloc
andreas.holzammer at kdab.com
Wed Dec 21 16:21:23 CET 2011
Am 21.12.2011 07:26, schrieb Robin Burchell:
> I've submitted two changes last night:
> - http://codereview.qt-project.org/#change,11562 - deprecating
> - http://codereview.qt-project.org/#change,11563 - removing all uses
> of them from QtBase
> My justification for this change is pretty simple - the only real
> reason to have these as far as I know is that it makes it possible to
> swap out memory allocation across Qt, but, there are usually other
> ways to accomplish this as the commit message notes, and it's rather
> unfair to impose an additional function call on all uses of these for
> something which isn't used in the majority of cases.
I don't think its a good idea to get rid of qMalloc/qFree/qRealloc,
because it is a good starting point for embedded platforms. Many of them
have trouble with memory allocation, if you have one point where you can
change the allocation it is easy to bypass these problems. We had to use
this for a project for Windows CE and I can tell you we where pretty
happy about qMalloc/qFree/qRealloc. It was not used everywhere, but we
where able to fix the others and make the whole allocation through
qMalloc which saved the project. Its something like the QT_NO_*
discussion, its far from ideal, but its a starting point and one can
easily use it.
This is just my point of view in this. But keep in mind that the Qt
embedded market is growing and that stuff like this is needed there.
> Once these changes go in, I'm happy to submit changes (if any) to other modules.
> Development mailing list
> Development at qt-project.org
Andreas Holzammer | andreas.holzammer at kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4134 bytes
Desc: S/MIME Kryptografische Unterschrift
Url : http://lists.qt-project.org/pipermail/development/attachments/20111221/4d6df84c/attachment.bin
More information about the Development