Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8962249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:05:31+00:00 2026-06-15T16:05:31+00:00

I have a QList<float**> . I first iterate on elements to work with them:

  • 0

I have a QList<float**>. I first iterate on elements to work with them:

for( int i = 0 ; i < nb ; i++ )
{
    float** data1 = data_list.at( i ) ;
    float** data2 = data_list.at( i + 1 ) ;
    // do things with data1 and data2

}

What happens if I delete[] in a C-stylish manner data1 and data2 inside this loop? Are elements at position i and i+1 in data_list destroyed as well (so that i cannot access them anymore) ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:05:32+00:00Added an answer on June 15, 2026 at 4:05 pm

    it is a list of float**. The float* they are pointing to are not in the list.
    which means if you use delete[], the memory is released, but data_list itself doesnt change. After this point they will be invalid pointers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class, Car, that inherits a QList< int >. I am wondering
I have a QList variable. How can I erase all the elements starting from
I have a collection of QList<int> 's that I need to calculate the union
I have a method to convert dec to bin QList<bool> widgetInput::decToBin(int number) { int
I don't have much experience with QT and this problem came out today. QList<int>
I have a QList list. I want to insert it on the database. I
Situation I have a QList<QVariant> where each QVariant item should be a QList<QVariant> of
Have deployed numerous report parts which reference the same view however one of them
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:
I have a QList which I have inserted pointers of objects into. I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.