Results 1 to 4 of 4

Thread: What's least expensive? (memory)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2008
    Posts
    153
    Thanks
    40
    Thanked 8 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default What's least expensive? (memory)

    What would be least expensive in this situation?

    Qt Code:
    1. QStringList lineStringList = file->readLine().split("\t");
    To copy to clipboard, switch view to plain text mode 

    or

    Qt Code:
    1. QString lineString = file->readLine();
    2. QStringList lineStringList = lineString.split("\t");
    To copy to clipboard, switch view to plain text mode 

    Thanks!

    BTW, the first one doesn't compile because it's not a QString but a byte array, but still, is it better to create a variable for each step or to combine?

    ~codeslicer
    Last edited by codeslicer; 20th February 2010 at 01:48.

Similar Threads

  1. QT shared memory
    By sweetsubha2020 in forum Qt Programming
    Replies: 2
    Last Post: 18th January 2009, 05:30
  2. Qt memory handling
    By Skizmo in forum Qt Programming
    Replies: 10
    Last Post: 18th November 2008, 11:07
  3. Qt3 Memory game
    By rjk in forum Qt Programming
    Replies: 3
    Last Post: 6th December 2007, 21:05
  4. Memory Leak in Qt
    By Krish_ng in forum Qt Programming
    Replies: 3
    Last Post: 22nd July 2007, 08:02
  5. Memory Requirements of Qt
    By Svaths in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 31st March 2007, 00:33

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.