help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: loadlibrary... again


From: Michael Goffioul
Subject: Re: loadlibrary... again
Date: Thu, 21 Nov 2013 10:44:44 -0500

On Thu, Nov 21, 2013 at 10:11 AM, marcimatz <address@hidden> wrote:
Hello,

I hope this is the right place to ask this. This is my first post and I am
very new to Octave.
I have a shared library that has several bindings (c/c++, Matlab, Java,
Python, Urbi). I want to make that library available in Octave.

So I understand there is no equivalent of loadLibrary in Octave. But how can
I handle following scenario in Octave (imagine the xxx-functions are
functions in my shared library, called via Octave):

clientId=xxxStartCommunicationWithServer(Ip,port)
xxxSendMessage(clientId,"Hello")
...
xxxStopCommunicationWithServer(clientId)

in above code, xxxStartCommunicationWithServer will start a communication
thread, connect to the server and stay connected until
xxxStopCommunicationWithServer is called.

If I use the Oct-file approach, each call to a xxx function will:
- load the library
- call the function
- unload the library

The unload of the library will automatically kill the communication thread
and release all memory/variables that were allocated during the call to
xxxStartCommunicationWithServer.

Why would every xxx call unload the library? AFAIK, the oct-file (and the dependent library) will only be unloaded by octave if you clear the function table.

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]