CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: KrishnaPG

Page 1 of 2 1 2

Search: Search took 0.03 seconds.

  1. How to create and manipulate Terabyte size Arrays with Win32API

    If you are like me, working on serious scientifc projects, then the chances are you are required to deal with huge data, data that does not fit into your tiny 2 or 4Gb RAM. If you are looking for a...
  2. CFugue The World's First and Only High level Music Note Programming Library for C/C++

    Popularily referred to as CFugue, meaning Carnatic Fugue or the C/C++ replacement of JFugue, MusicNoteLib is a high level Music Programming Library. This library makes it possible to play music notes...
  3. Replies
    21
    Views
    11,358

    Re: Why override new/delete operator?

    Dear exterminator, I got your point now and it seems valid. May be some want to implement that way.

    Thankyou for clarifying.

    It all depends on who you want to notify --- the end-user or the...
  4. Replies
    21
    Views
    11,358

    Re: Why override new/delete operator?

    Dear NMTop40, You are right, My bad, I had it other way round. Thanks for pointing it out.

    In such case, yes, the container class can be created on heap there by making this class object aslo...
  5. Replies
    21
    Views
    11,358

    Re: Why override new/delete operator?

    Dear manish_velankani, Thanks for the Code. Good Job.

    Thanking you,
    Yours,
    P.GopalaKrishna.
  6. Replies
    21
    Views
    11,358

    Re: Why override new/delete operator?

    Dear NMTop40, Unfortunately it is not true. When the constructor of this class is held private, there is no way objects of this class can be contained in another class.

    Thanking you,
    Yours,...
  7. Replies
    29
    Views
    2,335

    Re: Is this bad design???

    Dear exterminator, Since the calls are resolved at run-time based on the object type (and not based on pointer type), and since at run-time there is no access checking (such as private/public etc...)...
  8. Replies
    29
    Views
    2,335

    Re: Is this bad design???

    Dear humptydumpty,
    You have raised a Good point. Yes, we ought to be careful with that.

    Thanking you,
    Yours,
    P.GopalaKrishna.
  9. Replies
    21
    Views
    11,358

    Re: Why override new/delete operator?

    Dear exterminator, It seems you have some better way then, Could you please be so good as to point out that to us ?

    If your concern is about returning 0 from the function, then you might want to...
  10. Replies
    29
    Views
    2,335

    Re: Is this bad design???

    Dear Vedam Shashank, Ofcourse you should. The call should resolve to derived class and not base class, due to Run-time polymorphism.

    Thanking you,
    Yours,
    P.GopalaKrishna.
  11. Replies
    29
    Views
    2,335

    Re: Is this bad design???

    Dear exterminator, Are you Sure ?? Perhaps you want to check it out again..

    Dear Vedam Shashank,

    Since pBase pointer allows access to Derived::MyFunc(), which the class decares are private...
  12. Replies
    21
    Views
    11,358

    Re: Why override new/delete operator?

    Dear manish_velankani,

    Could you be so good as to present an example you have seen that portrays the usage of overloaded new mechanism to handle graceful exits in handling out-of-memory...
  13. Replies
    21
    Views
    11,358

    Re: Why override new/delete operator?

    Dear Rigel,

    Overloading new and its peers (new[], delete, and delete[]) is quite useful in restricting the way the object is created.

    For example,
    class OnlyStackAlloc
    {
    private:
    ...
  14. Re: Can Singleton GetInstance() function be inlined?

    Dear NMTOP40,

    Thankyou for your response.

    Finally, you got it correct. Keep it up.

    Thanking you,
    Yours,
    P.GopalaKrishna.
  15. Re: Can Singleton GetInstance() function be inlined?

    Dear exterminator,
    Thread-safety w.r.to initialization here is not defined in terms of number of times an object is initialized, but in terms of "whether the object is properly initialized by one...
  16. Re: Can Singleton GetInstance() function be inlined?

    Dear SuperKoko,
    Do not worry about the situation of invoking the constructor after assignment. Compilers are not that dumb --- they have clearly specified rules for them, Construction of object is a...
  17. Re: Can Singleton GetInstance() function be inlined?

    Dear NMTOP40,

    Thankyou for your reponse. As for your question

    May be you want to answer it yourself --- afterall it was your own singleton counter code that I have modified to show you how...
  18. Re: Can Singleton GetInstance() function be inlined?

    Dear Mr.venkyhyd,

    The code you have presented involves: static Class1 *UniqueObject;

    So you are using a native pointer type as a static varible, and hence its initialization does not involve...
  19. Re: Can Singleton GetInstance() function be inlined?

    Dear SuperKoko,

    There are dozens of "theoritically correct" singleton designs out there.

    But if you have not forgotten, the issue of this thread is more about the "efficiency factor" ---...
  20. Re: Article Fonts ReSizability Issue

    Dear Brad Jones,

    Thank you for taking note. I appreciate your efforts in this regard.

    Thanking you,
    Yours,
    P.GopalaKrishna.
  21. Re: Can Singleton GetInstance() function be inlined?

    Dear NMTop40,

    Thankyou for the time and efforts you have spent in providing the information, though I must admit that it is of little use to our discussion here --- as it has already been pointed...
  22. Re: Can Singleton GetInstance() function be inlined?

    Dear NMTop40,


    Are you sure? Perhaps you might want to check old posts here !!

    Thanking you,
    Yours,
    P.GopalaKrishna.
  23. Re: Can Singleton GetInstance() function be inlined?

    Dear NMTop40,

    Yes it is a singleton counter.

    The address tests of Mr.venkyhyd also confirm this.

    But, as pointed out by Mr.SuperKoko, due to the hidden boolen variable involved in...
  24. Re: Can Singleton GetInstance() function be inlined?

    Dear SuperKoko,

    Thankyou for the thorough and complete explanation again.

    You touched the real critical point: "Generally, compilers produce non thread-safe test code for the boolean flag! "...
  25. Re: Can Singleton GetInstance() function be inlined?

    Dear venkyhyd,

    Thankyou for brining the class - integer type difference to my attention. Now that you have mentioned it, I could see more clearly the purpose of your second code and it seems you...
Results 1 to 25 of 40
Page 1 of 2 1 2





Click Here to Expand Forum to Full Width

Featured