Board index » cppbuilder » Initialization of a Delphi unit
Rodrigo Gómez
![]() CBuilder Developer |
Rodrigo Gómez
![]() CBuilder Developer |
Initialization of a Delphi unit2004-05-22 01:10:58 AM cppbuilder85 Hello there. I have a series of delphi units that I need to be initializated before anything, as they are a Memory Manager and, if they are just linked to the project (adding the pas sources) the memmanager doesn't get changed at the right time, so things get created with the default MM and then tryed to free from the new Memory Manager. One of this unit implements a call to SetMemoryManager, in it's initialization section. Any idea of how to solve this? -- Rodrigo Gómez rgomez.msa.com.mx/gallery/ |
Palle Meinert
![]() CBuilder Developer |
2004-05-22 01:52:37 AM
Re:Initialization of a Delphi unit
I tried one once. It would take over all memory allocations happening from
the unit it was included and down. If this was not the top level unit a flag needed to be raized for it to co-exists with borlands memory mananger. In other words if it was included in the project source (project -->view source) and had it path-nmes added in front of the search path (project options) it worked without needing to co-exists. I hope it helps. /palle |
Palle Meinert
![]() CBuilder Developer |
2004-05-22 03:36:09 AM
Re:Initialization of a Delphi unit
Good to know, I hope it also work for your real program. My program was a
mixed C++/Pascal program and it worked all the way. But it didn't solve my problem which turned out to be caused by some range-errors :-/ The one I tested had it's description in the source file, telling which lines to re/un-mark for setting various options. In case you encounter any problems. /Palle "Rodrigo Gómez" < XXXX@XXXXX.COM >skrev i en meddelelse Quote>In other words if it was included in the project source (project --> {smallsort} |
Rodrigo Gómez
![]() CBuilder Developer |
2004-05-22 03:42:29 AM
Re:Initialization of a Delphi unit
Thanks for the tip, I'll try it. I think I have already done that, but
anyway, it worths checking it. -- Rodrigo Gómez rgomez.msa.com.mx/gallery/ "Palle Meinert" < XXXX@XXXXX.COM >escribi?en el mensaje QuoteI tried one once. It would take over all memory allocations happening from |
Rodrigo Gómez
![]() CBuilder Developer |
2004-05-22 03:56:28 AM
Re:Initialization of a Delphi unitQuoteIn other words if it was included in the project source (project -->view least the simple test app that failed now works, no AV at the end. Thank you very much! -- Rodrigo Gómez rgomez.msa.com.mx/gallery/ |
Rodrigo Gómez
![]() CBuilder Developer |
2004-05-22 06:39:14 AM
Re:Initialization of a Delphi unit
Well... it works fine with BCB6, as far as I can see, but not with BCB5.
I'm compiling right now a bigger project for BCB6, but I think that your solution will work fine... I hope so! Regards, -- Rodrigo Gómez rgomez.msa.com.mx/gallery/ "Palle Meinert" < XXXX@XXXXX.COM >escribi?en el mensaje QuoteGood to know, I hope it also work for your real program. My program was a |