L
Lloyd Dupont
I am using an OpenSource library I have wrapped in Managed C++.
There is no way I can do without it :-(.
Due to on going problem with this library (which I cannot debug as it is not
in a language supported by VS.NET and as GDB is pitifully inadequate) I plan
to compile this library with Boehm GC support.
I wonder if everything will work allright?
basically what I have looks like:
======================
// == The native library interface (which I will recompile with Boehm GC)
// create and destory pointers
struct TheObject { /* ... */ };
struct TheObject * createObject(char *);
void Destroy(struct* theObj); // presumably with GC enabled does nothing
// use it
struct void AMethod(struct TheObject* char* amethod, int param);
// == my MC++ wrapper
public ref class MyNClass
{
public:
MyClass()
{
pointer = createObject("TheObject");
}
~MyClass()
{
Destroy(pointer);
pointer = NULL;
}
AMethod(int p)
{
aMethod(pointer, "amethod", p);
}
private:
struct TheObject * pointer;
}
=====================
Will this all works gracefully?
comments, tips, links or similar experience?
There is no way I can do without it :-(.
Due to on going problem with this library (which I cannot debug as it is not
in a language supported by VS.NET and as GDB is pitifully inadequate) I plan
to compile this library with Boehm GC support.
I wonder if everything will work allright?
basically what I have looks like:
======================
// == The native library interface (which I will recompile with Boehm GC)
// create and destory pointers
struct TheObject { /* ... */ };
struct TheObject * createObject(char *);
void Destroy(struct* theObj); // presumably with GC enabled does nothing
// use it
struct void AMethod(struct TheObject* char* amethod, int param);
// == my MC++ wrapper
public ref class MyNClass
{
public:
MyClass()
{
pointer = createObject("TheObject");
}
~MyClass()
{
Destroy(pointer);
pointer = NULL;
}
AMethod(int p)
{
aMethod(pointer, "amethod", p);
}
private:
struct TheObject * pointer;
}
=====================
Will this all works gracefully?
comments, tips, links or similar experience?