| |

VerySource

 Forgot password?
 Register
Search
Author: meisetaisi

How is this memory released?

[Copy link]

0

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-7-5 20:15:01
| Show all posts
int&j=*new int(1) This should be a reference. But can the reference be used in this case? The reference can only be used for existing variables, he is equivalent to a person’s nickname, that person wants It is possible to exist first. The keyword new dynamically generates a variable, and his own name is only j.
Reply

Use magic Report

1

Threads

39

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 China

Post time: 2020-7-12 20:30:01
| Show all posts
This code can be executed. It's nothing strange.

There should be no mechanism for automatically releasing memory. Since this is the case, first of all, it must be recorded when applying, this is through dynamic
The requested memory can be obtained later to determine whether the memory needs to be released.

Sometimes when we write code, we enter the strange circle of making perpetual motion machines.
Reply

Use magic Report

0

Threads

6

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-7-13 09:00:01
| Show all posts
Mypigger's code seems to be very deep
Study well
Reply

Use magic Report

0

Threads

7

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-7-14 12:15:01
| Show all posts
The landlord your memory leaked;
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list