Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User RAKULA's Avatar
    Join Date
    Jan 2012
    Posts
    11
    I have an application with a QAccelerometer that lasts the duration of the application and is read at a high frequency. Should the pointer QAccelerometerReading* returned by the reading() function be deleted after each reading is taken?

  2. #2
    Nokia Developer Expert izinin's Avatar
    Join Date
    Oct 2007
    Posts
    441
    Hi

    you should not delete QAccelerometerReading* pointer returned by the QAccelerometer::reading() because this function is just accessor to property 'reading' -- it does not allocate memory that must be released by client.

  3. #3
    Registered User RAKULA's Avatar
    Join Date
    Jan 2012
    Posts
    11
    Thanks to izinin. I just wanted to make double sure I don't create serious heap corruption or memory leaks since these problems are not immediately obvious when one runs or debugs the application.

Similar Threads

  1. Replies: 2
    Last Post: 2011-06-13, 09:02
  2. QAccelerometer shows strange effects after changing output range
    By srebrodolskite in forum [Archived] Qt Mobility Project
    Replies: 2
    Last Post: 2010-11-16, 00:05
  3. Replies: 11
    Last Post: 2010-11-11, 08:41
  4. QMobility и QAccelerometer undefined reference to
    By alenon in forum Russian Developer Forum - Форум Российских разработчиков
    Replies: 2
    Last Post: 2010-05-20, 17:07
  5. Zero returned as UID
    By ssn.kishore in forum Symbian C++
    Replies: 2
    Last Post: 2008-05-05, 16:16

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved