Singletons and Marshalling

Discussion in 'Ruby' started by Charles Hixson, Nov 14, 2003.

  1. Does anyone know how singleton's and marshalling interact?

    In particular, I want to have my singleton class be able to dump and
    load (and be saved on a file). So I'm wondering if there are any
    methods to be implemented that would enable this.

    In particular, I'm composing a kind of container class that will contain
    either an array, a hash, or possibly both of values. Dumping it should
    be basically dumping all the members of the hash/array (plus a few
    more), and restoring should append the contents of the being-restored
    value to the one in memory. (Duplicates aren't a problem as they'll
    just be dropped.)

    If this can't be done, there are other approaches, but as they involve
    things like private class variables & classes that are only used
    internally as a cache.... well, the other approach looks cleaner, if
    it's possible.
     
    Charles Hixson, Nov 14, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Yevgeny Menaker

    C++ singletons and .NET AppDomains

    Yevgeny Menaker, Jan 10, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    331
    Yevgeny Menaker
    Jan 10, 2004
  2. Yevgeny Menaker

    C++ singletons and .NET AppDomains

    Yevgeny Menaker, Jan 10, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    297
    Yevgeny Menaker
    Jan 10, 2004
  3. Yevgeny Menaker

    C++ singletons and .NET AppDomains

    Yevgeny Menaker, Jan 10, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,956
    Alvin Bruney
    Jan 17, 2004
  4. Michael Brown
    Replies:
    3
    Views:
    4,074
    John C. Bollinger
    Aug 9, 2004
  5. crichmon
    Replies:
    4
    Views:
    497
    Mabden
    Jul 7, 2004
Loading...

Share This Page