CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2010
    Posts
    2

    a solution/design pattern for approching meny devices

    a lot of logic objects need to approch to meny devices.
    the solution today: interface class to implemented in a single class containg all the dfevices.
    Problem: the interface becomes a garbage collector.

    question: each logic class needs to approch to only few devices.
    the logic class need to stay encapsulated from devices.
    there are devices whice serve several logic classes

    Do someone have a solution/design pattern to this problem ?

  2. #2
    Join Date
    May 2009
    Posts
    2,413

    Re: a solution/design pattern for approching meny devices

    Quote Originally Posted by zevikbe View Post
    Do someone have a solution/design pattern to this problem ?
    If the interface "becomes a garbage collector", why don't you just require logic objects to call a dispose method when they're finished with a device? In that way the interface can remove devices when they're no longer in use.
    Last edited by nuzzle; May 28th, 2010 at 03:55 AM.

  3. #3
    Join Date
    May 2010
    Posts
    2

    Re: a solution/design pattern for approching meny devices

    the problem is with the interface not with the number of devices

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured