Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does WinRT have Garbage Collection?

Tags:

Does WinRT have Garbage Collection?

Or does it do reference counting as does COM?

like image 714
Alfred Myers Avatar asked Sep 15 '11 00:09

Alfred Myers


People also ask

Is Garbage Collection automatic memory management?

In the common language runtime (CLR), the garbage collector (GC) serves as an automatic memory manager. The garbage collector manages the allocation and release of memory for an application. For developers working with managed code, this means that you don't have to write code to perform memory management tasks.

What is the alternative to garbage collection in Java?

Another very fast approach is to have dedicated object pools for different classes of object. Released objects can just be recycled in the pool, using something like a linked list of free object slots. Operating systems often used this kind of approach for common data structures.

What is garbage collection process in operating system?

(1) Garbage collection is a function of an operating system or programming language that reclaims memory no longer in use. For example, Java and . NET have built-in garbage collection, but C and C++ do not, and programmers have to write the code to allocate and deallocate, which is tedious and error prone.


1 Answers

I found this article, which cites Microsoft's Martyn Lovell:

"WinRT objects are reference counted like COM for memory management, with weak references to avoid circularity."

Apparently this was mentioned at his talk on WinRT internals at the BUILD convention.

like image 50
Rob Avatar answered Sep 19 '22 06:09

Rob