0

I am working on a program which will be used for drawing vector pictures. As such, it will have to store points, paths defined by these points, pictures defined by these paths etc. Inkscape (http://inkscape.org/) which does something similar seems to use the Boehm Garbage Collector (http://www.hpl.hp.com/personal/Hans_Boehm/gc/). Does that mean it would be advisable for me to do the same also? I mean, what criteria should I use to determine whether I need to use a GC in my program?

Thanks.

jamadagni
  • 1,214
  • 2
  • 13
  • 18

1 Answers1

0

Whether garbage collection will be used or not depends on the programming language used to develop your application.

Garbage-collection is a memory-management technique and as such its use depends on the choice of programming language. Some programming languages are using garbage collection (such as Java, C#) and some do not use garbage collection (C/C++).

Btw. Inkscape uses the C, C++, Python, Perl, XSLT programming languages out of which Python and Perl use garbage collection for its memory management.

UPDATE: To learn more about C/C++ and Garbage Collection, I would recommend:

Community
  • 1
  • 1
Aleš
  • 8,896
  • 8
  • 62
  • 107
  • 1
    How does the Boehm GC (see question) fit into your model? –  Mar 20 '13 at 19:25
  • Well, C/C++ does not have a memory model using garbage-collection techniques by default. The Boehm GC is an extra library that brings the GC advantages into the language. Now when I am thinking about it, the question should be rephrased to "I am programming in C/C++, should I use BoehmGC or not"... – Aleš Mar 20 '13 at 20:42