GC Allocator - 支持垃圾回收的Allocator

来由

GC Allocator,顾名思义是指“具垃圾回收能力的Allocator”。它是《C++内存管理变革系列》引入的一个概念。目的在于释放了STL引入的Allocator的威力,并使得Allocator平民化。

GC Allocator改变了什么?

GC Allocator概念的引入,意味着:

  1. new/delete应该被废除。你需要用GC Allocator管理内存。
  2. C++程序员一样可以享受GC带来的好处,可以从繁琐的内存管理中解脱出来,而专注于程序逻辑本身。并且,我们的解决方案比GC更可控,因为一切仍然在掌握之中。这意味着你不会像GC语言的程序员一样被GC所困扰。

GC Allocator实作

相关参考

推荐阅读

C++内存管理变革系列

page tags: allocator gc memory
page_revision: 5, last_edited: 1206252195|%e %b %Y, %H:%M %Z (%O ago)
Unless stated otherwise Content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License