Results 1 to 7 of 7

Thread: Memory leaks when read/write to DOM

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2008
    Posts
    57
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Memory leaks when read/write to DOM

    I first started by not allocate anything on the heap. But it leaked memory.

    So I have started to try to allocate on the heap in order to be able delete when I dont want the object anymore. It still leaked memory.

    So I figured, if I allocate the element objects to, and delete them when I dont want them anymore.

    I very much would like to not allocate anything on the heap, but am not sure how & were the objects goes out of scope?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Memory leaks when read/write to DOM

    Quote Originally Posted by SailinShoes View Post
    I first started by not allocate anything on the heap. But it leaked memory.
    How did you verify this?

    I very much would like to not allocate anything on the heap, but am not sure how & were the objects goes out of scope?
    Well, that's something fundamental you just have to know about the programming language you use before you even start working with a toolkit like Qt. I suggest you refer to your favourite C++ book (notice that there are free and online books out there, you might want to search the forums for those).
    J-P Nurmi

Similar Threads

  1. memory leaks
    By Fastman in forum Qt Programming
    Replies: 1
    Last Post: 5th March 2008, 08:00
  2. Memory leak weirdness
    By Darhuuk in forum General Programming
    Replies: 10
    Last Post: 10th January 2008, 18:51
  3. Memory Leak in my Application :-(
    By Svaths in forum Qt Programming
    Replies: 4
    Last Post: 27th July 2007, 19:42
  4. why there are memory leaks in Qt?
    By cocalele in forum Qt Programming
    Replies: 1
    Last Post: 19th March 2006, 09:55

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.