小编nov*_*ato的帖子

时态数据库与时间序列数据库

我是数据库系统的新手,我想知道时态数据库和时间序列数据库之间有什么区别。我在互联网上搜索过,但没有对两者进行任何比较。

database time-series temporal-database

5
推荐指数
1
解决办法
5501
查看次数

GC.GetGeneration() returns always 0 for int variable even after calling GC.Collect() in C#

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:我试过在调试和发布模式下运行项目。

.net c# garbage-collection

1
推荐指数
1
解决办法
69
查看次数