Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

C++ Console Lesson 36: Dynamic Memory Allocation

Loading...

Sign in or sign up now!
20,394
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Mar 4, 2009

More at http://xoax.net
This C++ video tutorial demonstrates how to dynamically allocate memory in C++.


Please submit all questions to our forum:
http://xoax.net/forum/

  • likes, 1 dislikes

Link to this comment:

Share to:

Top Comments

  • Finally, good C++ tutorials. All others suck and show messy and inefficient code. FINALLY! XoAX, I believe the new keyword leads back to malloc. For C++ this is perfectly fine, however, if you are using Win32 along, I believe you should utilize HeapAlloc, HeapFree and so on.

  • Great lesson !

see all

All Comments (20)

Sign In or Sign Up now to post a comment!
  • Visual Studio sucks. Other than that, good tutorials!

  • @AES256bit

    Malloc calls HeapAlloc HeapFree or whatever system calls are platform dependant for memory management by default. Because Malloc is standard c library not platform dependant so it's implementation varies depending on which platform/architecture you're running on. Only advantage to using system calls is when you get into low-level programming and you want processes to share memory for ipc mostly on linux though because on windows you're better off using threads

  • From this point I think he got bored of doing tutorials and began explaining very fast without much clarification hehe!

  • Thank you, I got this now!

  • I didnt understand this tutorial well, in my point of view, allocating memory is something like changing his value but isnt easier just doing something like "MyVariable = MyValue" instead of alocating it on the memory and changing it there?

    Sry, im spanish speaker so my english listening isnt good so it is had for me to understand his explanation.

  • A bit too fast, some points could have been explained in more detail.

  • Dynamic memory is what I always get hung up on. Thanks for doing this.

  • Dude i was so stuck at trying to understand this in class, now i understand it soo much better, thank you for taking the time to put this tutorial up :)

  • i think this kind of lesson should be put at the end of all of his c++ vid.. because this is not necessary i think.. although this is useful but this makes some beginners confuse to learn.. btw really love the lesson

  • To answer some questions: "malloc" and "free" are for memory allocation in C. "new" and "delete" are for C++. Internally, "new" calls "malloc" and then calls the object's constructor. "delete", likewise, calls the object's destructor and then frees the memory. HeapAlloc and HeapFree are advanced forms of memory management for Win32 which are unnecessary for anyone watching a tutorial lesson. Just use "new" and "delete".

Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more