| |

VerySource

 Forgot password?
 Register
Search
View: 805|Reply: 4

Is the OLE that has been opened after the variable released controlled by the system?

[Copy link]

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-2-24 12:30:01
| Show all posts |Read mode
Call OLE variables in the function to open Office, such as WORD, EXCEL. After the function is executed, the system should release all variables. If Close and FreeAndNil are not called in the function, will the OS take over the OLE variables that have been opened after the function ends?

Thank you
Reply

Use magic Report

0

Threads

14

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-5-16 16:45:02
| Show all posts
OLE is a global variable,
One method to create
One method application
One method release
Just fine
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-5-21 13:45:01
| Show all posts
The problem is after the program is closed? I want to know whether the system will automatically take over, and how to get the pointer if it takes over.
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-8-7 15:00:01
| Show all posts
Like yourself
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-7 18:15:01
| Show all posts
Olevariant is not clear, but my understanding is that static variables are handled and released by the compiler's stack manager, and dynamic variables must be released by themselves. If the process is not released yet, the os wipes the ass. Do you know that the pointer does not matter, os Will enter the stack for scanning and cleaning.
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