当前位置: 首页 > news >正文

网站建设及网站推广网络营销的特点包括超前性

网站建设及网站推广,网络营销的特点包括超前性,龙岗区建设局网站,wordpress 修改表前缀非托管C C 有垃圾收集#xff0c;采用Hans-Boehm Garbage Collector的形式。也可能有其他垃圾收集库。 您可以使用使用RAII的智能指针#xff08;如果指针允许共享访问#xff0c;则使用引用计数#xff09;来确定何时删除对象。一个好的智能指针库是Boost的智能指针。绝大… 非托管C C 有垃圾收集采用Hans-Boehm Garbage Collector的形式。也可能有其他垃圾收集库。 您可以使用使用RAII的智能指针如果指针允许共享访问则使用引用计数来确定何时删除对象。一个好的智能指针库是Boost的智能指针。绝大多数情况下的智能指针可以取代原始指针。 一些应用程序框架如Qt构建对象树以便框架的堆分配对象具有父子关系。因此所有需要的是delete在一个对象上调用一个对象并且它的所有子对象也将自动成为deleted。 托管c 您可以通过两种方式使用.NET中的C 托管或非托管。在托管模式下.NET的垃圾回收将代表您释放内存; 在非托管模式下您接近C 的正常/标准行为因此您必须自己负责记忆。 使用公共语言运行时有许多优点部分优点如下   1它使程序的性能得到了改进 2能够轻松的使用其他语言开发的组件 3支持语言功能例如面向对象编程的继承、接口和重载 4允许创建多线程的可放缩应用程序的显示自由线程处理支持 5结构化异常处理支持 6自定义特性支持 7垃圾回收机制 8使用委托取代函数指针从而增强了类型安全和安全性。 总结 语言趋于同质化语言趋于插件化。 摘抄 真正的答案是制作安全高效的垃圾收集机制的唯一方法是对不透明引用进行语言级别的支持。或者相反缺乏对直接内存操作的语言级支持。 Java和C可以做到这一点因为它们有特殊的参考类型不能被操纵。这使运行时可以自由地执行诸如在内存中移动分配的对象这对于高性能的GC实现至关重要。 为了记录没有现代的GC实现使用引用计数所以这完全是一个红鲱鱼。现代GC使用世代收集其中新分配的处理方式基本上与堆栈分配采用C 语言相同然后定期将任何新分配的仍处于活动状态的对象移动到单独的“幸存者”空间并且整个一代的对象被立即释放。 这种方法有优点和缺点好处在于支持GC的语言的堆分配与不支持GC的语言的堆栈分配一样快缺点是在销毁之前需要执行清理的对象需要一个单独的机制例如C的using关键字否则他们的清理代码将不确定地运行。 请注意高性能GC的一个关键是必须为特定类别的参考提供语言支持。C没有这种语言支持永远不会; 因为C 有运算符重载它可以模拟一个GCd指针类型尽管它必须小心翼翼地完成。事实上当微软发明了可以在CLR.NET运行时下运行的C 方言时他们必须为“C风格的引用”例如Foo^发明新的语法以将它们与“C 风格的引用” 例如Foo。 C 的确有什么而C 程序员经常使用的是智能指针它实际上只是一个引用计数机制。我不认为引用计数是“真正的”GC但它确实提供了许多相同的好处代价是比手动内存管理或真正的GC更慢的性能但具有确定性破坏的优势。 在一天结束时答案真的归结为语言设计功能。C做出了一个选择C 做出了一个选择使其能够与C向后兼容同时仍然提供足够适用于大多数目的的替代方案并且Java和C做出了与C不兼容的另一种选择但也足够用于大多数目的。不幸的是没有银弹但熟悉不同的选择将有助于你选择正确的那个你正在试图建立的任何程序。 The real answer is that the only way to make a safe, efficient garbage collection mechanism is to have language-level support for opaque references. (Or, conversely, a lack of language-level support for direct memory manipulation.) Java and C# can do it because they have special reference types that cannot be manipulated. This gives the runtime the freedom to do things like move allocated objects in memory, which is crucial to a high-performance GC implementation. For the record, no modern GC implementation uses reference counting, so that is completely a red herring. Modern GCs use generational collection, where new allocations are treated essentially the same way that stack allocations are in a language like C, and then periodically any newly allocated objects that are still alive are moved to a separate survivor space, and an entire generation of objects is deallocated at once. This approach has pros and cons: the upside is that heap allocations in a language that supports GC are as fast as stack allocations in a language that doesnt support GC, and the downside is that objects that need to perform cleanup before being destroyed either require a separate mechanism (e.g. C#s using keyword) or else their cleanup code runs non-deterministically. Note that one key to a high-performance GC is that there must be language support for a special class of references. C doesnt have this language support and never will; because C has operator overloading, it could emulate a GCd pointer type, although it would have to be done carefully. In fact, when Microsoft invented their dialect of C that would run under the CLR (the .NET runtime), they had to invent a new syntax for C#-style references (e.g. Foo^) to distinguish them from C-style references (e.g. Foo). What C does have, and what is regularly used by C programmers, is smart pointers, which are really just a reference-counting mechanism. I wouldnt consider reference counting to be true GC, but it does provide many of the same benefits, at the cost of slower performance than either manual memory management or true GC, but with the advantage of deterministic destruction. At the end of the day, the answer really boils down to a language design feature. C made one choice, C made a choice that enabled it to be backward-compatible with C while still providing alternatives that are good enough for most purposes, and Java and C# made a different choice that is incompatible with C but is also good enough for most purposes. Unfortunately, there is no silver bullet, but being familiar with the different choices out there will help you to pick the correct one for whatever program youre currently trying to build. https://softwareengineering.stackexchange.com/questions/113177/why-do-languages-such-as-c-and-c-not-have-garbage-collection-while-java-does 参考: https://stackoverflow.com/questions/1695042/is-garbage-collection-automatic-in-standard-c https://msdn.microsoft.com/en-us/library/yk97tc08.aspx?f255MSPPError-2147217396 https://baike.baidu.com/item/%E5%85%AC%E5%85%B1%E8%AF%AD%E8%A8%80%E8%BF%90%E8%A1%8C%E6%97%B6/4361434?fraladdin 31 down vote The real answer is that the only way to make a safe, efficient garbage collection mechanism is to have language-level support for opaque references. (Or, conversely, a lack of language-level support for direct memory manipulation.) Java and C# can do it because they have special reference types that cannot be manipulated. This gives the runtime the freedom to do things like move allocated objects in memory, which is crucial to a high-performance GC implementation. For the record, no modern GC implementation uses reference counting, so that is completely a red herring. Modern GCs use generational collection, where new allocations are treated essentially the same way that stack allocations are in a language like C, and then periodically any newly allocated objects that are still alive are moved to a separate survivor space, and an entire generation of objects is deallocated at once. This approach has pros and cons: the upside is that heap allocations in a language that supports GC are as fast as stack allocations in a language that doesnt support GC, and the downside is that objects that need to perform cleanup before being destroyed either require a separate mechanism (e.g. C#s using keyword) or else their cleanup code runs non-deterministically. Note that one key to a high-performance GC is that there must be language support for a special class of references. C doesnt have this language support and never will; because C has operator overloading, it could emulate a GCd pointer type, although it would have to be done carefully. In fact, when Microsoft invented their dialect of C that would run under the CLR (the .NET runtime), they had to invent a new syntax for C#-style references (e.g. Foo^) to distinguish them from C-style references (e.g. Foo). What C does have, and what is regularly used by C programmers, is smart pointers, which are really just a reference-counting mechanism. I wouldnt consider reference counting to be true GC, but it does provide many of the same benefits, at the cost of slower performance than either manual memory management or true GC, but with the advantage of deterministic destruction. At the end of the day, the answer really boils down to a language design feature. C made one choice, C made a choice that enabled it to be backward-compatible with C while still providing alternatives that are good enough for most purposes, and Java and C# made a different choice that is incompatible with C but is also good enough for most purposes. Unfortunately, there is no silver bullet, but being familiar with the different choices out there will help you to pick the correct one for whatever program youre currently trying to build. ———————————————— 版权声明本文为CSDN博主「fengmao31」的原创文章遵循CC 4.0 BY-SA版权协议转载请附上原文出处链接及本声明。 原文链接https://blog.csdn.net/fengmao31/article/details/80170982
http://www.pierceye.com/news/273308/

相关文章:

  • 怎样做招聘网站怎么在拼多多卖东西
  • 网站建设与网站管理网站怎么显示百度名片
  • 技术支持 盈岚网站建设典当行网站策划
  • 如何找到网站的模板页面中国优秀网站设计
  • 金融公司 网站开发简易个人博客网站源码
  • 小企业网站建设哪找网站制作软件dw
  • 百度收录提交网站后多久收录重庆个人房源网
  • 深圳网站建设制作公司排名网站设计怎么收费
  • 免费培训学校网站源码成免费crm破解版
  • w网站建设湖北建设厅举报网站
  • 营销型网站分为哪几种乐山网站建设公司
  • 淘宝网站建设类别好看的网站后台界面
  • 海口网站建设工作中企动力全球邮企业邮箱
  • 青岛网站制作排名绵阳做网站优化
  • 扬州市建设工程造价管理站网站开发建设网站
  • 广州网站设计公司济南兴田德润o评价潍坊响应式网站建设要多久
  • 网站模板如何优化平阳县建设局网站
  • 厦门外贸网站找谁可以做app的网站
  • 本地电脑静态网站建设游戏代理平台免费
  • 网站建设公司的成本有哪些内容wordpress admin空白
  • 高端网站建设如何收费济南行业网站建设
  • 昆明网站制作专业麦当劳订餐网站 是谁做的
  • 网站代备案公司名称网页游戏怎么搭建
  • 教师在哪些网站可以做兼职做平面的公司网站
  • php网站后台程序做游戏ppt下载网站有哪些
  • 柳州正规网站制作公司佛山企业名录黄页
  • 企业网站做备案网站换域名 百度收录
  • 平面网站模版网站建设需要的费用
  • 营销型网站案例展示如何做网赌网站
  • 商融交通建设工程有限公司网站wordpress的伪静太文件