cstrato@EUnet.at writes: > 1, Memory leaks: > In line 84 I use the following code, similar to code found in guitest.C: > > fFrameInfo->AddFrame(new TGLabel(fFrameInfo,new TGString("Last > Name")), > new TGLayoutHints(kLHintsTop | kLHintsLeft)); > Here TGLabel, TGString and TGLayoutHints are created within a function, > but never explicitely deleted. Does this result in memory leaks when the > dialogbox will be closed, or will these objects be deleted > automatically? Yes. See how test/guitest.cxx uses fCleanup for an easy way to handle these objects. > 2, TGGroupFrame "Author Info": > Here I use TGMatrixLayout which results in a large distance between > TGLabel > and TGTextEntry. Is there a better way to implement it? > Could I use TGTableLayout, and how do I need to implement this? Yes, TGTableLayout might be better. It decides the row and column widths based on the largest vertical and horizontal dimension, respectively, of the elements. You can also have an element span more than one column/row. See test/guiviewer.{cxx,h} for an example of how to use this. Can't help you on the rest, but looking forward to hearing the answers. -Brett.
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:57 MET