Search:

Type: Posts; User: derder

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    1,661

    What is the difference between TokenItem *tok...

    What is the difference between

    TokenItem *tok = new TokenItem(); delete tok;
    and

    TokenItem tok = TokenItem();

    In the later example, I suppose there is some sort of mechanism to track the...
  2. Replies
    7
    Views
    1,661

    Also is it true that as long as I don't create...

    Also is it true that as long as I don't create classes using new and a pointer then I don't have to worry about memory leaks and deallocation? Is this called static allocation?

    What's the best way...
  3. Replies
    7
    Views
    1,661

    deallocating newly created static classes

    Hello,
    I have a while loop, and in it, I allocates a new class called TokenItem. It is then pushed into a vector. Question: When is the TokenItem deallocated? Do I have to explicitly delete it?

    ...
Results 1 to 3 of 3