Search:

Type: Posts; User: matsp

Search: Search took 0.16 seconds.

  1. Replies
    21
    Views
    16,573

    new is also an operator, but I was more thinking...

    new is also an operator, but I was more thinking of what happens inside the code after the compiler has done it's job.

    For example, we can imagine a compiler that compiles this:


    class A
    {...
  2. Replies
    21
    Views
    16,573

    That is correct, new "replaces" malloc in C++....

    That is correct, new "replaces" malloc in C++. However, new is quite often implemented through malloc (or sometimes the other way around), so the actual problem wouldn't really change. Since C++...
  3. Replies
    21
    Views
    16,573

    Most likely, some previous code has overwritten...

    Most likely, some previous code has overwritten some data needed by malloc - malloc uses a data structure immediately before the memory you get to store some "private" stuff. If free is called, a...
Results 1 to 3 of 3