我是数据库系统的新手,我想知道时态数据库和时间序列数据库之间有什么区别。我在互联网上搜索过,但没有对两者进行任何比较。
Below is code snippet in which I am getting generation of variable int j before and after calling garbage collector.
int j = 30;
WriteLine(GC.GetGeneration(j) );
GC.Collect();
WriteLine(GC.GetGeneration(j));
Run Code Online (Sandbox Code Playgroud)
The output should be
0
1
Run Code Online (Sandbox Code Playgroud)
as int j is surviving garbage collection But I am getting
0
0
Run Code Online (Sandbox Code Playgroud)
我不明白为什么会发生这种情况,因为int它也是 C# 中的一个对象。PS:我试过在调试和发布模式下运行项目。