09-25-2010 03:11 PM
Hi Experts!
I need your opinion about the following. I have a class(Data Storage) with many class attributes... (standard by value obj DP.). I wanna use this class in many places, ie. parallel running vis where wiring is not possibe but i have to wire it somehow to keep the dataflow.
My first solution was the following: - Used Global Variable every time when I call any method on object. Get object from Global var. -> Call Method -> Set object to Global var. I knew this is not the best sloution what I could use, but two days ago I read an article about Global/Local vars. and the article said, every time when i use Global/Local Vars, the data is copied every time. ( the above mentioned class prupose is a general data storage). So I have started to look for any usable soution and found the following:
so I don't now how to go on! Could you help me to make a right decision or suggest me any solutions? Thank you very much
09-27-2010 07:52 AM
Hi Durnek,
Singleton design pattern can be easily implemented by using classes by reference.
I included example of using classes by reference and example of Singleton class.
Regards,
Jiri Keprt
NI EE Czech Republic
CLA, CTA
09-27-2010 07:56 AM
Thank you again! 🙂