[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] [C++]heap allokering?



Egon Andersen wrote:
Hvorfra ved du, at free() ikke frigiver hukommelsen?

Det står i dokumentationen! Der er en begrundelse til hvorfor hukommelses håndtering ikke er lavet rigtigt her:


http://www.xilinx.com/xlnx/xil_ans_display.jsp?getPagePath=12421&iLanguageID=1

Umiddelbart vil jeg forvente at new er en allokering + initialisering (jeg har dog ikke meget kendskab til c++).

Det er det også, men jeg forestillede mig at man kunne kalde konstruktøren bagefter man havde hapset hukommelsen.


GNU C/C++ er open source, så er det ikke nemmere at fixe en eventuel fejl, i stedet for at lave mærkelige work-arounds?

Jeg er ganske sikker på jeg sagtens kan få fat i sourcen til C/C++ librariesne, men helt seriøst er jeg ikke sikker på jeg kan begribe hvad der foregår i det - helt så skarp er jeg heller ikke.


Tilgengæld har jeg nok fundet mig en løsning (sådan går det altid, en halv dags googling og intet resultat. Så spørger man om hjælp, googler 30 sek. og så finder man noget :-) ). Denne her side forklarer om hvordan man giver sig i lag med det jeg har tænkt mig:

http://www.bearcave.com/software/c++_mem.html

Hilsen Anders

 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *