The handle is used to manipulate an object/resource, that is, to manipulate a target, what does a handle mean? How do you explain the release handle?
Reply content:
The handle is used to manipulate an object/resource, that is, to manipulate a target, what does a handle mean? How do you explain the release handle?
Objects such as your object, the handle is like your object's mobile phone number, you do not always care about where you are the object, you just need to call TA phone can be found, even when the release can be a phone call: "We broke up."
句柄The English word is handle .
The handle is the callback function.
句柄(handle) can be semantically understood as 把手 . With this handle, you can get the resources. Pull the handle is equal to holding the resources, for the handle operation is tantamount to the operation of resources. For example:
There is also a word in English that love handle refers to a circle around the belly can pinch to pinch the small fat, literal translation can be understood as "The handle of Love"
Similar is a channel, an object that maintains a certain state.
Some resources cannot be manipulated directly because of their nature, and they need to be manipulated through a handle.
Like what:
-
The operational database requires identity, so the handle to the database after the login is logged in with identity information to operate the database
-
The file reads and writes the file pointer position, reads and writes needs to control the pointer position, the handle provides a stateful channel.
-
Timer is a state, the timing state assigned to the handle, when triggered by some things can go to handle the handle (cancel timing, advance trigger) and so on.
Your application tends to do something about objects (data files, custom data structures, etc.), and handles can simply be understood as a pointer to these objects. After your program starts, these objects are not immutable in memory, on the one hand due to processor scheduling and so on, on the other hand, the current operating system is mostly based on virtual memory space, in this case, the memory manager will often move objects back and forth to meet the needs of the current operation, So if the way we're looking for an object is simply to rely on a pointer----pointing to a fixed memory address, then obviously there's no way to deal with the changing actual memory, so the handle can be said to be a pointer to the pointer, which itself does not directly point to the object, However, it can be used to learn about the memory changes of an object, and then indirectly to get the object
In other words, the address of the actual object in memory is usually not fixed, while the fixed handle describes the location of the object in memory.
There are pointers to structs in C language.