On Mon, 19 Oct 2009 03:47:47 +0200, Alan Grimes <agri...@speakeasy.net> wrote:
> I might have been a bit overzealous with converting things to STL > container classes. > > On the upside, it's a wonderful way to manage memory for things. On the > down side, the container classes love to re-organize their internal data > stores at will. If we simply do something with a pointer to one of those > elements, we'll be okay. However, if we try to store one of those > pointers in another structure, we could be in for a whole pile of Hurt. > =( > > There are some techniques that can help discourage certain STL classes > from re-organizing themselves too much. It would be good to have some > Real Experts(tm) chime in on how best to abuse C++ to solve the problems > the code tries to solve. > > I ph34r I've introduced a whole pile of bugs of this kind over the last > week. I just spent the whole day, successfully, debugging the > matrixDisplay bug I mentioned earlier. > What about using pointer-based containers... and use pointers and QGuardedPointers? In java style: we have the heap, allocate each object there, and move around with the pointers. The hard part is to clean up those pointers -- this needs planning. (I'm not an expert) ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Ktechlab-devel mailing list Ktechlab-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ktechlab-devel