BTW API and host has different (can't have) class information (class pointer, VMT, etc..) for the same object, so by definition they not communicate with the SAME class. The classes could have same name, and can act the same, but the equality operation would give you FALSE result. Also inheritance handling definiatily would be problem (different VMT, and different memory mapping at the two sides, etc...).

So basicly pure Object based API is off the table.
Interface based might be good, and we ended up with COM.


On 2014.08.11. 10:49, Molnár Attila wrote:
Lets see the next scenatios

#1 : API call creates object and returned to host
    - in this case object has to be readonly (at least buffer like fields)1
    - host has to support reference counting2

#2 : API call parameterised by a host created object
    - see #1


1 : can't write because in that case data contained by the object could be allocated by different memory managers
2 : Must have all mayor language/compilers support ref.count and has to be the same



With this restrictions what gain do you have with OO/Interface API over C style API?


On 2014.08.11. 10:02, Dimitry Sibiryakov wrote:
   It is not true as well. Memory manager is not a problem as long as object are freed in 
the same module where were created. Reference counting solves this well.




------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to