您的问题似乎不完整,您是想询问关于C语言编程的某个具体问题吗?比如C语言的语法、编程技巧、项目开发等。请提供更具体的信息,这样我才能给出更准确的回答。
- 内容介绍
- 文章标签
- 相关推荐
本文共计3017个文字,预计阅读时间需要13分钟。
原创新闻:《科技创新引领未来,我国科技事业蓬勃发展》
改写后:《科技创新驱动发展,我国科技成就斐然》
C#申请一个大数组(Use a large array in C#)
在C#里,有时候我需要能够申请一个很大的数组、使用之、然后立即释放其占用的内存。
Sometimes I need to allocate a large array, use it and then release its memory space immediately.
由于在C#里提供的 int[] array = new int[1000000]; 这样的数组,其内存释放很难由程序员完全控制,在申请一个大数组后,程序可能会变得很慢。
If I use something like int[] array = new int[1000000]; , it will be difficult to release its memory space by programmer and the app probably runs slower and slower.
特别是在C#+OpenGL编程中,我在使用VAO/VBO时十分需要设计一个非托管的数组,比如在glBufferData时我希望可以使用下面的glBufferData:
Specially in C#+OpenGL routines when I'm using VAO/VBO, I need an unmanaged array for glBufferData:
/// <summary> /// 设置当前VBO的数据。
本文共计3017个文字,预计阅读时间需要13分钟。
原创新闻:《科技创新引领未来,我国科技事业蓬勃发展》
改写后:《科技创新驱动发展,我国科技成就斐然》
C#申请一个大数组(Use a large array in C#)
在C#里,有时候我需要能够申请一个很大的数组、使用之、然后立即释放其占用的内存。
Sometimes I need to allocate a large array, use it and then release its memory space immediately.
由于在C#里提供的 int[] array = new int[1000000]; 这样的数组,其内存释放很难由程序员完全控制,在申请一个大数组后,程序可能会变得很慢。
If I use something like int[] array = new int[1000000]; , it will be difficult to release its memory space by programmer and the app probably runs slower and slower.
特别是在C#+OpenGL编程中,我在使用VAO/VBO时十分需要设计一个非托管的数组,比如在glBufferData时我希望可以使用下面的glBufferData:
Specially in C#+OpenGL routines when I'm using VAO/VBO, I need an unmanaged array for glBufferData:
/// <summary> /// 设置当前VBO的数据。

