Recent

Author Topic: Purpose of Classes  (Read 3306 times)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9857
  • Debugger - SynEdit - and more
    • wiki
Re: Purpose of Classes
« Reply #15 on: October 12, 2019, 01:07:10 am »
It appears that maybe an Iinterface with ref counting is what the poster wants?

He hasn't mentioned releasing at all, so I wouldn't guess.

Either a singleton (but then no count needed, just check the variable to the single instance)...
Or a pool of objects. Then a pool object would be a good choice.

If it is a pool then lets hope it is not a thread pool (well he hasn't mentioned threads either), or hope that the counter access is threadsave. (I.e. in his sample guaranteed to be called from one thread only)

The fun game of guessing another persons intend, without having any info...

jamie

  • Hero Member
  • *****
  • Posts: 6128
Re: Purpose of Classes
« Reply #16 on: October 12, 2019, 03:23:48 am »
Most likely trying to emulate java or Python which pretty much do inline object/classes on the fly.

  But then again, that would mean the poster isn't accustom to a real generated program instead of some script kiddy results. ;D

 
The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018