Languages

Menu
Sites
Language
Making a SO file multiton

I'm trying to create multiple instances of a library so file but when I try to create 2 objects it turns out to be the same.

 

So is it possible to create multiple objects of a class defined in so file. If yes what could be the possible reason for the above.

Responses

2 Replies
Derek Forbes

Hello, yes, it is possible to create multiple objects of a class defined in a shared object (so) file. The issue you are facing may be due to a misunderstanding or a mistake in your code

victoria emmy

The design of the class to ensure that only one instance is created and make a provision to globally access the instance.