Re: volatile or what? ...
From: Darko M. (mdanko_at_tesla.rcub.bg.ac.yu)
Date: 12/22/03
- Previous message: Darko M.: "Re: fileio in c"
- In reply to: Fletcher Glenn: "Re: volatile or what? ..."
- Next in thread: Lorinczy Zsigmond / Domonyik Mariann: "Re: volatile or what? ..."
- Reply: Lorinczy Zsigmond / Domonyik Mariann: "Re: volatile or what? ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 22 Dec 2003 14:52:02 -0800
> Sounds like you have a variable scope problem. However you have that
> variable defined, the compiler thinks that the variable is falling out of
> scope, so the destructor is called. You should look carefully at where your
> "global" variable is defined, and be sure that you are not dealing with a
> variable in scope local to the signal handler only.
I hope I haven't been misunderstood. I sure did declare it globally,
it is so easy - you just put
it ouside any function. Therefore I am quite sure that the destructor
doesn't show up because of
bad scope analyzis. The thiing is that I am really confused that a
destructor is called which,
following all the rules of a good sense, should happen only in
situations when the given object comes out of scope.
The thing that was actually supposed to happen is that the global
variables' contents stay
untouched after the signal handler exits, even if the signal handler
explicitly modified those
variables. I was prepared to that, and ready to use volatile or
something, but than this happened which, as I said and you have
noticed, certainly should not be allowed to happen.
I would appreciate at least an answer saying, for an example, "it is
up to C++" or "It is up to UNICES memory management" or anything, I
really don't get it.
- Previous message: Darko M.: "Re: fileio in c"
- In reply to: Fletcher Glenn: "Re: volatile or what? ..."
- Next in thread: Lorinczy Zsigmond / Domonyik Mariann: "Re: volatile or what? ..."
- Reply: Lorinczy Zsigmond / Domonyik Mariann: "Re: volatile or what? ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|