Lib1[dll] { class A { static int i=0; } } Program1[exe] have reference to Lib1 { Class B { main() { A.i = 5; } } } Program2 [exe] have reference to Lib1 { Class C { main() { A.i = 5; } } }
如果PROGRAM1和Program2中被同時執行時,是有可能,它們引用到LIB1的單個實例,並切換到艾在PROGRAM1靜態變量製成可用來Program2中反之亦然,加載同一實例
哪個操作系統? – dthorpe 2011-05-13 18:10:06