Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.
/ appinstance Public archive

Application Global Instance Declaration Macro(Instantiate once in application, will be destroyed(called drop) at application exit)

License

Notifications You must be signed in to change notification settings

Pctg-x8/appinstance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AppInstance

Instantiate once in application anytime, will be destroyed once at application exit

pub struct Application { main_window: Window }

impl Application
{
	// Instantiated an Application once
	AppInstance!(pub static instance: Application = Application::new());
	fn new() -> Self { ... }
}
// Application::main_window::drop is going to be called at exit

About

Application Global Instance Declaration Macro(Instantiate once in application, will be destroyed(called drop) at application exit)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages