最近在工作中遇到一個問題,就是我有多個線程會調用bitmap對象,運行的時候報錯,對象當前正在其他地方使用。第一反應肯定是加鎖啊,於是我就在每個用到bitmap的地方都加了鎖,但是運行之後依然報這個錯 測試代碼如下 using System; using System.Drawing; using ...
C#-垃圾回收機制(GC) 什麼是GC 官網中有這麼一句話: The garbage collector is a common language runtime component that controls the allocation and release of managed memory ...