|
From: James W. W. <os...@jw...> - 2005-01-26 07:57:06
|
On Jan 25, 2005, at 5:55 AM, Roger Holmes wrote: > It is the constructors I want to use, and I don't think there is any > way > of doing this without using this syntax. There is a way; look up "placement new". > I think I had better read the > latest information on "operator new", it seems to have become rather > more complicated than when I first learnt C++. I am looking for a way > to define an "operator new" which I can specify when I create my > objects > which can call Q3Memory_AllocateClear. For allocating the class info > objects I am not worried about the overhead of clearing the memory. > However, if we decide to use constructors for the objects themselves > then clearing the memory before we initialise it does seem inefficient. I agree. If you provide a constructor, I think it's OK to use plain old operator new. -- <http://www.jwwalker.com/> |