faq.html 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  4. <title>Appendix B: FAQ</title>
  5. <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
  6. <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
  7. <link rel="home" href="../../index.html" title="Boost.Pool">
  8. <link rel="up" href="../appendices.html" title="Appendices">
  9. <link rel="prev" href="history.html" title="Appendix A: History">
  10. <link rel="next" href="acknowledgements.html" title="Appendix C: Acknowledgements">
  11. </head>
  12. <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
  13. <table cellpadding="2" width="100%"><tr>
  14. <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
  15. <td align="center"><a href="../../../../../../index.html">Home</a></td>
  16. <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
  17. <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
  18. <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
  19. <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
  20. </tr></table>
  21. <hr>
  22. <div class="spirit-nav">
  23. <a accesskey="p" href="history.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgements.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
  24. </div>
  25. <div class="section">
  26. <div class="titlepage"><div><div><h3 class="title">
  27. <a name="boost_pool.appendices.faq"></a><a class="link" href="faq.html" title="Appendix B: FAQ">Appendix B: FAQ</a>
  28. </h3></div></div></div>
  29. <h6>
  30. <a name="boost_pool.appendices.faq.h0"></a>
  31. <span class="phrase"><a name="boost_pool.appendices.faq.why_should_i_use_pool_"></a></span><a class="link" href="faq.html#boost_pool.appendices.faq.why_should_i_use_pool_">Why
  32. should I use Pool?</a>
  33. </h6>
  34. <p>
  35. Using Pools gives you more control over how memory is used in your program.
  36. For example, you could have a situation where you want to allocate a bunch
  37. of small objects at one point, and then reach a point in your program where
  38. none of them are needed any more. Using pool interfaces, you can choose to
  39. run their destructors or just drop them off into oblivion; the pool interface
  40. will guarantee that there are no system memory leaks.
  41. </p>
  42. <h6>
  43. <a name="boost_pool.appendices.faq.h1"></a>
  44. <span class="phrase"><a name="boost_pool.appendices.faq.when_should_i_use_pool_"></a></span><a class="link" href="faq.html#boost_pool.appendices.faq.when_should_i_use_pool_">When
  45. should I use Pool?</a>
  46. </h6>
  47. <p>
  48. Pools are generally used when there is a lot of allocation and deallocation
  49. of small objects. Another common usage is the situation above, where many
  50. objects may be dropped out of memory.
  51. </p>
  52. <p>
  53. In general, use Pools when you need a more efficient way to do unusual memory
  54. control.
  55. </p>
  56. </div>
  57. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  58. <td align="left"></td>
  59. <td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
  60. Distributed under the Boost Software License, Version 1.0. (See accompanying
  61. file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
  62. </p>
  63. </div></td>
  64. </tr></table>
  65. <hr>
  66. <div class="spirit-nav">
  67. <a accesskey="p" href="history.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgements.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
  68. </div>
  69. </body>
  70. </html>