Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / May 2005

Tip: Looking for answers? Try searching our database.

VC++.NET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Partha - 20 May 2005 07:33 GMT
Can u brief abt how to use the _gc(Garbage Collector) in VC++.NET.Plz give me
an example
William DePalo [MVP VC++] - 20 May 2005 15:29 GMT
> Can u brief abt how to use the _gc(Garbage Collector) in
> VC++.NET.Plz give me an example

You don't use the garbage collector. It's just there in the presence of
.Net's Common Language Runtime. It reclaims the memory occupied by objects
that you create dynamically when there are no longer any references to them.

You use the "_gc" syntax in Managed C++ to mark a class as being on the
managed heap - the one which the garbage collector control. In other words
you use it to allocate instances of classes which are compatible with the
.Net object model in a "dialect" of C++ crafted especially for .Net. You can
start reading about that here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netstart/html/c
pcsvbvcjscript_managed_c__.asp


Regards,
Will

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.