Board index » kylix » Re: Cross Platform Development
Dmitry
kylix Developer |
Re: Cross Platform Development2005-07-30 12:01:15 AM kylix1 Sorry, "create" should be read as "great" :))) "Dmitry" < XXXX@XXXXX.COM >wrote in message Quote
|
Dmitry
kylix Developer |
Re: Cross Platform Development2005-07-30 12:01:15 AM kylix1 Sorry, "create" should be read as "great" :))) "Dmitry" < XXXX@XXXXX.COM >wrote in message Quote
|
Andreas Hausladen
kylix Developer |
2005-07-30 12:02:01 AM
Re:Re: Cross Platform Development
Jonathan Benedicto wrote:
QuoteSo I would have to make the library export all these a extern "c" Regards, Andreas Hausladen (www.kylix-patch.de.vu - unofficial Kylix 3 patches) (andy.jgknet.de/blog) |
Andreas Hausladen
kylix Developer |
2005-07-30 12:03:33 AM
Re:Re: Cross Platform Development
Jonathan Benedicto wrote:
QuoteI had to do this so that the library would work across c++ compilers. versions: gcc 2.95 vs. gcc 3.x -- Regards, Andreas Hausladen (www.kylix-patch.de.vu - unofficial Kylix 3 patches) (andy.jgknet.de/blog) {smallsort} |
Jonathan Benedicto
kylix Developer |
2005-07-30 02:06:21 AM
Re:Re: Cross Platform Development
"Andreas Hausladen" < XXXX@XXXXX.COM >wrote in message
QuoteExactly. Jonathan |
Michael Schnell
kylix Developer |
2005-07-30 05:22:04 AM
Re:Re: Cross Platform DevelopmentQuoteYou are right, I forgot about that. Chrome definately would be another route. -Michael |
Dan Palley
kylix Developer |
2005-07-30 07:07:07 AM
Re:Re: Cross Platform Development
"Michael Schnell" < XXXX@XXXXX.COM >wrote in message
Quote>You are right, I forgot about that. Chrome definately would be another Dan |
Simon Kissel
kylix Developer |
2005-07-30 09:29:02 PM
Re:Re: Cross Platform DevelopmentQuote>You are right, I forgot about that. Chrome definately would be another route. Simon |
Simon Kissel
kylix Developer |
2005-07-30 09:30:59 PM
Re:Re: Cross Platform DevelopmentQuote"Michael Schnell" < XXXX@XXXXX.COM >wrote in message to run under Mono, but with Chrome you actually get support on it from the vendor. Still, personally I'm not really interessted in Chrome as I'm not interested in .NET/Mono. I want my applications to be native and fast. Simon |
Michael Schnell
kylix Developer |
2005-07-31 02:09:12 AM
Re:Re: Cross Platform DevelopmentQuoteIf I want to target .NET/MONO, why wouldn't I just use the existing Delphi e.g. .NET has a built-in garbage control. So you usually never do a "free" for a component. This is done by the framework, but not "as soon as possible" (the Delphi way) but "only when necessary" (e.g. if the memory is needed for some other purpose. Thus D2005 creates a lot of overhead. e.g./2 Strings are handled by the .NET framework. But here, normal Strings are read-only. Than means you can do "s1 := s1+s2;" but the old s1 is (virtually) freed and a new s1 is created. but you can't do "s1[5] := 'A'" or "setlength(s1,10);". To do something like this you need to use the special "stringbuilder" class that is much slower than normal strings. -Michael |
Dan Palley
kylix Developer |
2005-07-31 03:29:08 AM
Re:Re: Cross Platform Development
"Michael Schnell" < XXXX@XXXXX.COM >wrote in message
Quote>If I want to target .NET/MONO, why wouldn't I just use the existing Quote
homepages.borland.com/abauer/archives/2003_11_16_archive.html This link is referenced from MS blogs where they indicate that the Delphi method is a good approach: weblogs.asp.net/astopford/archive/2003/11/22/39277.aspx "... rather than modify existing Delphi code to make use of IDispose the compiler provides the Free method to do this for you. It's interesting to note that the compiler also controls this to prevent Free from being called twice. I can see the real value of adding this feature to the compiler as it provides a higher level to the programmer for clearing up." Here's another link on the BDN site: bdn.borland.com/article/0,1410,29365,00.html In short, calling free doesn't invoke GC immediately; it merely lets the GC know that the object can be cleaned up. Quotee.g./2 Strings are handled by the .NET framework. But here, normal Strings Dan |
Jeff Overcash (TeamB)
kylix Developer |
2005-07-31 06:55:12 AM
Re:Re: Cross Platform Development
Michael Schnell wrote:
Quote
Quotee.g. .NET has a built-in garbage control. So you usually never do a collect it when it normally would. Quotee.g./2 Strings are handled by the .NET framework. But here, normal Quote-Michael (Please do not email 'Till I lost the peace that dreaming gives me directly unless I dreamed of the moment of my own death asked. Thank You) That no one ever dreams and lives (Marillion) |
Michael Schnell
kylix Developer |
2005-07-31 07:51:47 PM
Re:Re: Cross Platform Development
Thanks for the pointers,
-Michael |
Michael Schnell
kylix Developer |
2005-07-31 07:57:37 PM
Re:Re: Cross Platform DevelopmentQuoteWrong. In Delphi you have the choice of normal GC and deterministic freeing. QuoteThis is the .NET way. You also use StringBuilder with C# etc. objects instead of .NET strings and thus to much less performance. Or am I wrong ? -Michael |
Michael Schnell
kylix Developer |
2005-07-31 08:19:39 PM
Re:Re: Cross Platform Development
"To the world outside Delphi, your objects simply appear to implement
the IDisposable pattern." "So, when you call Free on the component, the expectation is that that component is removed from the Owner's list immediately. These semantics are now preserved." This is what I heard would create a performance problem. Even though (of course) the GC "collecting" action is not called by doing "Dispose" on an "IDisposable" object (this is only done automatically when resources are low or by calling some .NET API), using "IDisposable" at all and calling "Dispose" was said to be unnecessary and reduce performance. Many objects are created once and either live until the end of the application or it does no harm to let them live, as resources are not tight. Thus GC would never do anything at all and does not need to be informed about the objects' state by making them IDisposable. -Michael |
Jeff Overcash (TeamB)
kylix Developer |
2005-08-01 01:26:03 AM
Re:Re: Cross Platform Development
Michael Schnell wrote:
Quote
strings. The correct way is with the StringBuilder class no matter what .NET language you are using. The difference in speed between the Win32 string class and the .NET one is because the Win32 string class is an AnsiString and fully memory allocated through the Delphi memory manager. The .NET string class (no matter what .NET language you are using) does all its allocation/deallocation though the OS, much slower. It does not matter what .NET language you use, the string class will be slower. That is why the StringBuilder class was introduced (by MS, not Borland) to give you speed when manipulating strings under .NET. Quote-Michael (Please do not email 'Till I lost the peace that dreaming gives me directly unless I dreamed of the moment of my own death asked. Thank You) That no one ever dreams and lives (Marillion) |