mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-15 20:25:46 +02:00
Ensure there is only one instance of CConfigurationBasedDescriptorManager
This commit is contained in:
parent
3e5b00fc98
commit
26b2779bb9
1 changed files with 7 additions and 0 deletions
|
@ -88,6 +88,13 @@ public class CConfigBasedDescriptorManager implements ICDescriptorManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CConfigBasedDescriptorManager getInstance(){
|
public static CConfigBasedDescriptorManager getInstance(){
|
||||||
|
if(fInstance == null){
|
||||||
|
fInstance = getInstanceSynch();
|
||||||
|
}
|
||||||
|
return fInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static synchronized CConfigBasedDescriptorManager getInstanceSynch(){
|
||||||
if(fInstance == null){
|
if(fInstance == null){
|
||||||
fInstance = new CConfigBasedDescriptorManager();
|
fInstance = new CConfigBasedDescriptorManager();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue