File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ func WithJSONDecoder(decoder JSONDecoder) InitOption {
140140
141141// Init loads the dynamic library related to the MAA framework and registers its related functions.
142142// It must be called before invoking any other MAA-related functions.
143+ // It must not be called concurrently with Release or other MAA-related functions.
143144// Note: If this function is not called before other MAA functions, it will trigger a null pointer panic.
144145func Init (opts ... InitOption ) error {
145146
@@ -207,11 +208,13 @@ func Init(opts ...InitOption) error {
207208}
208209
209210// IsInited checks if the MAA framework has been initialized.
211+ // It must not be called concurrently with Init or Release.
210212func IsInited () bool {
211213 return inited
212214}
213215
214216// Release releases the dynamic library resources of the MAA framework and unregisters its related functions.
217+ // It must not be called concurrently with Init or other MAA-related functions.
215218func Release () error {
216219
217220 if err := native .Shutdown (); err != nil {
You can’t perform that action at this time.
0 commit comments