naked new okay for Qt classes with parent pointers

This commit is contained in:
Sean Rhea
2009-08-24 19:54:32 -07:00
parent 59d0b0ede1
commit 20b7c401ad

View File

@@ -16,8 +16,11 @@ them when possible. -- Sean
variable, declare it "static" withing a .cpp file.
- Only call C++'s operator new within the constructors and reset() functions
of std::auto_ptr, boost::scoped_pointer, etc. Never call delete explicitly.
Do not use malloc or free unless forced to by an external C library.
of std::auto_ptr, boost::scoped_pointer, etc. or when passing a parent
pointer to a Qt class (so that the parent deletes the child). Never call
delete explicitly.
- Do not use malloc or free unless forced to by an external C library.
- Allocate large buffers on the heap, not on the stack.