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

  • Home
  • SEARCH
  • 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 9227925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:11:57+00:00 2026-06-18T05:11:57+00:00

I have a relatively simple question. In one of my CS classes, for an

  • 0

I have a relatively simple question. In one of my CS classes, for an assignment, we have to make a simple side-scrolling game using C++ and the XLib libraries. In a forum we have for the class, a lot of students complained about memory leaks and issues with dynamic allocation. I am almost done the assignment, but I haven’t had to use any dynamic allocation. I’ve just been using stack space, and have had no issues with this so far.

I am just wondering if there is any drawbacks to this? Seems like a lot of the other students are using dynamic allocation. If my little game works fine just using the stack, do I have any reason to worry?

Thanks guys.

  • 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-18T05:11:58+00:00Added an answer on June 18, 2026 at 5:11 am

    There is nothing wrong per-se about using memory on the stack, though you need to be careful about allocating anything of decent size.

    For instance:

    // inside some function ...
    int blah[1000];
    // ...code using blah
    

    might work fine, or you could run out of space and fail silently.

    I would suggest using new / malloc() if you need a big chunk of memory, but it’s fine to use small arrays on the stack.

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

Sidebar

Related Questions

I have a relatively simple question. Will using PHP guarantee that a form is
I have a relatively simple question that I cannot seem to find the answer
I have a question, and I'm sure there is a relatively simple answer to
I have two relatively simple codes. One main activity and one intent service. Main
I have a relatively simple application which I need to make native Mac OSX
I have what i thought was a relatively simple question but i cannot find
This is a relatively simple question: I can trim a text with ellipsis using
I have a relatively simple question. Say I have a file but I only
I'm sure this is a relatively simple question, it's just one thing I've always
I have what should be a relatively simple question that I can't seem to

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.