platform: delay destruction of NMPlatform singleton until NMConfig gets destroyed
We want to create the platform instance rather late (especially after claiming the D-Bus service). But we also want to destroy it very late, because NMPlatform does not make use of any other singletons, but other singletons make use of NMPlatform.
This commit is contained in:
@@ -420,11 +420,7 @@ main (int argc, char *argv[])
|
|||||||
/* Set up platform interaction layer */
|
/* Set up platform interaction layer */
|
||||||
nm_linux_platform_setup ();
|
nm_linux_platform_setup ();
|
||||||
|
|
||||||
/* FIXME: intentionally leak the singleton instance of NMPlatform.
|
NM_UTILS_KEEP_ALIVE (config, NM_PLATFORM_GET, "NMConfig-depends-on-NMPlatform");
|
||||||
* nm_linux_platform_setup() will register the singleton for destruction,
|
|
||||||
* but we don't yet shut down all singletons properly, so don't destroy
|
|
||||||
* NMPlatform. */
|
|
||||||
g_object_ref (NM_PLATFORM_GET);
|
|
||||||
|
|
||||||
nm_dispatcher_init ();
|
nm_dispatcher_init ();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user